• Resolved daycarebom

    (@daycarebom)


    i can’t find how to Selectively disable Related Posts from appearing on specific category
    just only can found
    Exclude an entire category from ever appearing among Related Posts results
    or
    Selectively disable Related Posts from appearing on specific posts
    or
    Selectively disable Related Posts from appearing on specific pages

    pls halp me …

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Animesh Gaurav (a11n)

    (@bizanimesh)

    Hi there,

    You can use this snippet:

    function jetpackme_hide_related_posts_in_categories( $options ) {
        if (
            in_category(
                array( 17, 15, 14 )
            )
        ) {
            $options['enabled'] = false;
        }
    	
        return $options;
    }
    add_filter( 'jetpack_relatedposts_filter_options', 'jetpackme_hide_related_posts_in_categories' );

    At the place of 17, 15, 14 you can add your category ids. Here is how to find category id.

    For us: p1638353424381600-slack-CBG1CP4EN

    Thread Starter daycarebom

    (@daycarebom)

    omg !! really thanks bro !!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to Selectively disable Related Posts from appearing on specific category’ is closed to new replies.