[Resolved] How can I disconnect certain post category from the post navigation?

Home Forums Support [Resolved] How can I disconnect certain post category from the post navigation?

Home Forums Support How can I disconnect certain post category from the post navigation?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2372239
    jisu

    Hello,

    Recently I figured out how to hide the post category from my blog page, but When I write a post, the post navigation shows my hidden category blog post. How can I disconnect the hidden category from the post navigation?

    Thanks

    #2372518
    David
    Staff
    Customer Support
    #2374122
    jisu

    Hello,

    I have added the code but hidden blog post is still appear in my blog post navigation.
    Please check below URLs
    https://swim.im/blog/celinebrandstory/

    #2374142
    jisu

    I have another problem.
    I only see hidden category post in every issued post’s post navigation.

    #2374236
    jisu

    I fixed this problem by editing snippet code, but i still can’t exclude hidden blog category from post navigation. I have tried the code that you provide from previous forum but nothing happen. Please take a look at the link i left on reply.

    thanks,

    #2374264
    David
    Staff
    Customer Support

    So this is the code to remove Posts of a specific Category from the post nav:

    
    add_filter( 'get_next_post_excluded_terms', 'tu_exclude_terms' );
    add_filter( 'get_previous_post_excluded_terms', 'tu_exclude_terms' );
    function tu_exclude_terms() {
        return array( 10, 15 );
    }

    the 10 and 15 are the Category Term IDs. you need to swap them to the category(ies) you want to exclude.

    If thats not working, please share a post to where i can see the problem.

    #2374330
    jisu

    what is the category terms IDs?

    https://swim.im/blog/celinebrandstory/

    in the end of the post you see hidden post which i want to exclude.

    thanks,

    #2374341
    jisu

    David,

    I found out the id. Problem resolved. Thanks

    #2375041
    David
    Staff
    Customer Support

    Glad to hear that!!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.