dongpeng0127
dongpeng0127
2016-08-20 08:53

在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 dqhsv0147421 5年前

    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.

    点赞 评论 复制链接分享

相关推荐