dongpeng0127 2016-08-20 08:53
浏览 64
已采纳

在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.

http://sourabhsomani.com/generate-qr-code-using-igniteui/

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.

Thanks

  • 写回答

1条回答 默认 最新

  • dqhsv0147421 2016-08-20 10:46
    关注

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

    https://codex.wordpress.org/Function_Reference/next_post_link

    Example:

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

    Parameters

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?