query_posts offset issue
-
I’ve done some searching around and I still can’t figure out what is happening. Basically what happens is that Page 1 shows 5 posts, Page 2 shows 10 posts, but there is no link to Page 3 (which should show 2 posts that are remaining). If I manually goto the link, I get an error due to no articles.
$paged is being set (so it’s not a null value issue).
This is the query_post structure I’m using (minus a few extra fields like post__not_in and cat, which shouldn’t be effecting it.
query_posts( array( 'posts_per_page'=> ( ( $paged == 1 ) ? 5 : 10 ), 'offset' => ( ( $paged == 1 ) ? 0 : ( ( $paged - 1 ) * 10 ) - 5 ) ) );
Totally lost :/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘query_posts offset issue’ is closed to new replies.