Showing same posts on all pages of pagination ?


Sometimes pagination in wordpress shows same posts on all paginated pages. You see similar entries on all paged links. Even wp-pagenavi doesn’t work properly.

Are you tired of not getting accurate result for this problem? Try putting

‘paged’ => get_query_var(‘paged’) or,

‘paged’ => get_query_var(‘page’)  ( If posts are on a static front page )

in query_posts(array ( ‘category_name’ => ‘blog’ ) ); as

query_posts(array ( ‘category_name’ => ‘blog’, ‘paged’ => get_query_var(‘paged’) ) ); or,

query_posts(array ( ‘category_name’ => ‘blog’, ‘paged’ => get_query_var(‘page’) ) );

Did it worked ?

No, try deleting or editing similar slugs.


Want to know the reason behind this ?

Actually when we do not supply  ‘paged’ => get_query_var(‘paged’)  in array of query_posts it does not receive the array explaining which posts are associated with which page. So by default it returns first 4 or 5 or 6 or whatever is the number of posts you are showing on a page.

Did not worked for you ?

Please elaborate your problem via comments.

Thank You!


Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: