Correct Pagination w/ PageNavi and query_posts
-
Ok. So I am having the problem outlined here—where I’ve got a different number of posts showing on the homepage than on the paged pages. The issue, is say I’m showing 6 posts on the homepage, and fifteen on all other pages. This means, each page has a 15-post offset. So on the second page, it assumes the homepage displayed 15 posts—where in fact it only displayed 6. The result is posts 7-15 are excluded altogether. Here is my code (not adapted from the above provided link):
global $query_string; if (is_home()) : query_posts($query_string."posts_per_page=6"); endif;
As a note: I am using wp-PageNavi for my page navigation.
I’m not entirely sure what to do. I tried WPEngineer’s solution, but ended up with unexpected results. Help?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Correct Pagination w/ PageNavi and query_posts’ is closed to new replies.