• Resolved longnha

    (@longnha)


    Hi,

    I use the following filter to exclude category:

    function jetpackme_filter_exclude_category( $filters ) {
        $filters[] = array( 'not' =>
          array( 'term' => array( 'category.slug' => 'travel-end' ) )
        );
        return $filters;
    }
    add_filter( 'jetpack_relatedposts_filter_filters', 'jetpackme_filter_exclude_category' );

    The category travel-end is a child category.

    Unfortunately, it’s not working, posts from travel-end still show up in related post. I forced WP to reindex the site but still the same.

    Any fix please?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    I can see that you’re taking the example from this post – https://jetpack.com/support/related-posts/customize-related-posts/

    I forced WP to reindex the site but still the same.

    Can you please clarify what exactly you did “reindex”?

    Could you please post your site URL here, so I can have a look?

    If you want it to remain private, you can also contact us via this contact form:

    https://jetpack.com/contact-support/?rel=support

    Thanks!

    Thread Starter longnha

    (@longnha)

    Hi,

    I mean that I initiate a sync manually via WordPress.com dashboard.

    I also contact support via contact form a few days ago but no response.

    Thanks.

    We were not able to replicate this issue on our test site.

    Does the issue persist if you temporarily deactivate the other plugins on the site and use a default theme, like Twenty Seventeen?

    Also, can you provide the address of the site in question, as we previously requested?

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Exclude Category not working’ is closed to new replies.