Sourabh Somani Sourabh Somani - 1 year ago 133
MySQL Question

Post pagination in Wordpress

I am getting issue with post pagination in wordpress. I have 2 categories, suppose C programming and C++ Programming. I am writing tutorials on both technologies but I want pagination on post page categorywise like I have following link.

At the bottom of the page I am getting other tutorial link which I have written for C programming before so please suggest me how can I paging categorywise.

So C programming post will be in C programming category and C++ in C++ Category.


Answer Source

Please refer below link it will help how to make post pagination within the category wise.


<?php previous_post_link('%link', 'Next: %title &raquo;' , true, 'excluded_categories '); ?>
<?php next_post_link('%link', '&laquo; Previous: %title', true, 'excluded_categories '); ?>


true : Indicates whether next post must be within the same taxonomy term as the current post. If set to 'true', only posts from the current taxonomy term will be displayed.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download