0

Showing same posts on all pages of pagination ?

 

Sometimes when we try to use pagination in wordpress it does not work even if we use any of the available plugin.

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

 

‘paged’ => get_query_var(‘paged’)

 

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

 

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

 

Did it worked ?

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!

Virender Singh

Virender singh is a web developer who has been freelancing for last 2 years. For last few years he developed various websites on PHP / Wordpress. Now he started blogging to share what he learned from web in last 2 years. He has not undergone any special training for his development skills. He strongly believes that we may learn all the technical things from Mr. Google. Google has been the best tutor for him so far. He has accomplished over 40 projects and got a very good response from clients. To know more about him click here.

Leave a Reply

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