0
votes
0answers
8 views

Start WP Pagination From Number 1 in URL

I am using this code to paginate gallery post type images: $images = get_posts(array( 'post_type' => 'attachment', 'post_status' => 'inherit', 'post__in' => $image_ids, 'orderby' => ...
0
votes
1answer
23 views

Pagination and Related Posts

Is it possible to use pagination with the following related posts code, which is embed in single.php of my theme. <?php // for use in the loop, list 5 post titles related to first tag on ...
0
votes
1answer
16 views

Pagination for custom query won't let me back on page 1

I have a custom query … <?php /** * The loop that displays the posts. */ ?> <ul class="post-items"> <?php $args = array( 'post_type' => array('post', 'wr_raffle'), ...
0
votes
0answers
27 views

Make a paginated article (for easier reading on mobile)

I'm looking for some plugin, or perhaps more likely some Javascript package that will make me do something like mobil.idg.se on a phone (select a story, then swipe sideways to read the next part of ...
0
votes
1answer
205 views

Pagination for Pages and Posts

I want to use Pagination throughout a new theme but am having trouble getting it to work correctly. I am using some code within my functions.php file and then calling that function. It works on the ...
0
votes
1answer
379 views

JetPack Infinite Scroll not working on custom theme

I have a custom theme where I've tried to integrate the Infinite Scroll option within JetPack. Per this article, I've added the following code to functions.php (in addition to activating the module) - ...
-3
votes
1answer
44 views

Newer/Older posts links display same posts on every page

I am using a plugin called "Types" to generate custom post types for drink/food recipes. I want to show booth drink and food recipes on the same page. The posts are displaying fine, but for some ...
0
votes
2answers
149 views

Should $found_posts be returned as string in 'found_posts' filter hook?

In general a function that hooks into the found_posts filter looks like this: add_filter( 'found_posts', 'adjust_offset_pagination', 10, 2 ); function adjust_offset_pagination( $found_posts, $query ) ...
0
votes
1answer
77 views

how to show posts on different pages if number of post per page is one

i have a category named "services". when "our services" is clicked control go to category.php file. in that i need to show all the posts in that service category. i can show all of them in a single ...
0
votes
0answers
54 views

Numeric Pagination Not working

I wrote a function that does (it's unrefactored, bare with me): protected function _index_numeric_posts_pagination($options){ global $wp_query; $total = ...
0
votes
0answers
12 views

Older/Newer post links display the same posts [duplicate]

I am trying to code my loop so that there are Older posts and Newer posts links below the loop, currently I am using the wp-pagenavi plugin for this but when I click the "previous posts" link, it ...
0
votes
0answers
50 views

How do I paginate posts page with $wpdb?

I am using this to get the posts: (...) if ( empty( $categories_defined) ) { $posts = get_posts($args); } else { global $wpdb; $posts = $wpdb->get_results( $wpdb->prepare( "SELECT * ...
0
votes
1answer
239 views

Archive Page for Custom Post Type is not Working

I have registered a custom post type "tutorials" with the following snippet. <?php /* Template Name: Tutorial Archive */ get_header(); ?> <div id="content"> <div ...
0
votes
0answers
71 views

Can't get pagination to work

I'm trying to create pagination on a blog post page where one page displays 13 blog posts and then displays some links to go to another page. Now just to get it working, I'm using this code: <?php ...
0
votes
1answer
1k views

How to display a paginated list of posts from one category on a page? [duplicate]

I'm trying to use the code from this page: Display Blog Posts on any Page (with navigation) http://digwp.com/2013/01/display-blog-posts-on-page-with-navigation/ My goal is to make pages that display ...
0
votes
1answer
48 views

How to inject a post within a loop

I'm trying to inject a post while the loop is running. This post will be injected on a condition, so if(x == j){ //inject post here } I see this would seem easy to do, but i have a posts_per_page ...
0
votes
1answer
63 views

Customizing Comments on Posts

I have implemented custom code for generating comments on post page using callback function in functions.php. function MYTHEME_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ...
0
votes
1answer
191 views

Pagination for normal (standard) posts on a page with a custom loop?

probably a rather straight forward question. my "homepage" is not the blog-page. I have a page-template named page-knowledge.php which has the following loop on it. <?php echo '<ul ...
2
votes
2answers
2k views

Next_posts_link() works only with original $wp_query

I've got custom template that I want to display paged blog posts. This is the beginning of my file: $wp_query = new WP_Query($args); if($wp_query->have_posts()){ ...
1
vote
1answer
865 views

Load posts into sidebar and paginate via ajax?

Is it possible to paginate, or load the next / previous posts in the sidebar without messing with the entire page pagination? Such as AJAX? Right now I'm querying custom post type posts to load the ...
2
votes
2answers
96 views

Different amount of posts on homepage than paged pages

I've done some searches here and on Google but everything I'm finding isn't working correctly. I was hoping to post my code here and get help with where I'm going wrong. On the index page of my ...
5
votes
1answer
79 views

Allow variable amount of comments before pagination

There is an option in the admin settings allowing you to define how many comments should be listed before creating a new page for the next ones. I would like to have the same number of comments for ...
0
votes
1answer
226 views

Converting multiple loops into one single loop with pagination

I am using Isotope jquery plugin to filter/sort posts in Wordpress but to correctly filter the posts into the right order I have needed to output each category one after the other. To do this I've ...
2
votes
1answer
411 views

pagination hook doesn't work with search results

I use my custom Pagination function on my web site; #Pagination function pagination($prev = '«', $next = '»') { global $wp_query, $wp_rewrite; ...
1
vote
1answer
289 views

Setting pagination for images attached to a post

I am trying to figure out how to paginate a post for it's images. I have a custom post type set up to act like a gallery - images only. And would like to paginate the images. I am having a hard time ...
0
votes
1answer
62 views

how to add pagination to the organize series plugin

I'm thinking of using the organize series plugin for posts featuring learning videos. As they are step1, step2 etc I'd rather use pagination instead of the next/previous links. Does anyone know how ...
0
votes
1answer
311 views

Total number of posts in query (category/tag/author/search results/main page…)

I want to know the total number of posts from the category/tag/author/search result that I am actually seeing. Say for example I am in the main page. If my posts_per_page are 10 and my pagination ...
0
votes
1answer
2k views

Custom Post Type Pagination 404 Error (if paged>=2) [duplicate]

I coded a WordPress theme. I added a Photo Gallery with custom post type. But if paged>=2, it gives 404 error. If you open my web site link and click Tümünü Göster (Show All) button, you can test ...
0
votes
1answer
178 views

How to get pagination working with “Pending” Posts

I'm working on a site that allows users to browse through pending posts/content on the front-end. However, I can't seem to get pagination working with those posts. I've got a custom query that ...
1
vote
1answer
1k views

Custom Post Type Pagination Doesn't Work in Wordpress 3.4

I have a problem when using Wordpress 3.4. My "Products" custom post type pagination doesn't work. Here is the code I use $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $loop = new ...
1
vote
2answers
512 views

wordpress post pagination with image buttons?

I'm trying to make a post pagination like this: button left image | 1 2 3 4 5 |button right image but I can't get it work. I've tried: <?php ...
2
votes
1answer
268 views

How can I get all posts data from within a paginated search result?

Let's say I'm doing a search on my site, and get 50 posts as a result. The pagination is set to 10 posts per page, so I have 5 pages of results. When I'm on the first page of results, if I inspect ...
1
vote
1answer
445 views

Use two different post_per_page limits with infinite scroll

I have one loop on my homepage that I use infinite scroll to paginate. To keep the load time of the homepage down, I want to load a smaller initial amount than when the infinite scroll is triggered ...
0
votes
1answer
247 views

Why won't pagination work?

I am using a page template with code to display all blog posts: <?php /* Template Name: Blog */ ?> <?php get_header(); ?> <div id="main"> <?php // ACF Page number variable ...
0
votes
2answers
446 views

Getting content from a single *page* of a post

What function can I use to fetch content of a single page within a post? Let's say I want to split my post into 5 pages - how can I get content of, say, page 3? Can't seem to find this in Codex...
0
votes
2answers
1k views

Pagination for posts inside a specific category

I have a FAQ category and there are posts in that category I want to add pagination to that category only, not the other category in my wordpress. In short giving pagination to selected category for ...
2
votes
1answer
4k views

Change Posts per page count

In the wordpress settings => Reading => Blog pages show at most [input field] posts I have it set to 3 posts at the moment. On my index, date archives, tag archives, category archives, search ...
0
votes
1answer
96 views

Display “Post 2 of 4” on single post page?

I have a custom post type called Projects. When viewing a single 'project' post I have next/prev buttons to navigate through them. I also want to display text saying "Project 2 of 4" or ideally ...
1
vote
2answers
1k views

Pagination on single post page?

I've found many pagination tutorials/plugins that work on pages displaying a list of posts such as index.php E.g. - ...
2
votes
4answers
321 views

A way to detect which page a post is on

I'm wondering if there is a good way to tell which archive page a post came from. I essentially just need the post's position in the total order, then divide it by the 'posts_per_page' option. The ...
0
votes
3answers
47 views

Not displaying any articles on a custom made file

I have created the file latest.php in the public_html so that when I go to www.domain.com/latest.php it will show me the latest articles. Sadly, nothing of the posts came up. Later, I will sort them ...
1
vote
1answer
1k views

posts_nav_link() not displaying anything

I'm having difficulty getting posts_nav_link() to display anything. Below is my index.php template file, I'm using permalinks (index.php/2011/08/26/sample-post/ format) and I've currently got my Blog ...
1
vote
1answer
564 views

how to know if the post has pagination (<!--nextpage-->) or not

i need a solid solution for checking if a post has pagination or not, regardless of the number of current page in the pagination, and even if the post is in the first page of the pagination. the check ...
2
votes
3answers
734 views

Automatically create pages in a post based on number of words

I need a method to automatically create pages (using <!--nextpage-->) in posts based on number of words. For example... A post containing 1200 words should be broken down into 6 pages with ...
1
vote
2answers
125 views

can't use the page_test method to check pagination

I've tried to follow the example for Testing for paginated Pages but i don't know why it isn't working. i put it in the single.php file for post detection. i don't know why the page_test is broken. ...