[Resolved] Next and prev. post link ONLY within category

Home Forums Support [Resolved] Next and prev. post link ONLY within category

Home Forums Support Next and prev. post link ONLY within category

  • This topic has 7 replies, 4 voices, and was last updated 4 years ago by Leo.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #546064
    arbeni

    It’s possible to add Next and prev. Post link ONLY within category

    Thanks

    #546423
    Leo
    Staff
    Customer Support

    Hi there,

    Just to confirm this, so you only want to show the post navigation if someone click on a single post from a category listing page?

    #547007
    arbeni

    Hey,
    I use WP Show Posts Pro so that I can select categories and have certain categories in certain pages. e.g. in home page I have category 1, and when I open a post I want to have the possibility below to navigate only in this category.at the moment it is so that I have the navigation below by date.

    Thanks

    #547529
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    If I’m understanding correctly, this filter should help: https://docs.generatepress.com/article/generate_category_post_navigation/

    add_filter( 'generate_category_post_navigation', '__return_true' );

    #548053
    arbeni

    That’s It…Great work, guys!

    #548348
    Tom
    Lead Developer
    Lead Developer

    Awesome 🙂

    #1235853
    Sol

    HI,

    I just brought the theme and i am not a champ. I just have the same requirement. could you please tell me on which page I need to add this code or need to change the code?

    I just need what to do but just want to know where I can do the change.

    Thanks
    Nik

    #1236367
    Leo
    Staff
    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.