• I have managed to exclude muliple categories by following the details on this post, but what I actually want to achieve is to exclude a particular category AND it’s children/grandchildren, so I don’t have to keep going back when new children/grandchildren are added.

    I’ve tried variations on $filters[] = get_categories( array( 'child_of' => 'slug' ) );
    but I think the problem sits with slugs vs category ID’s

    Any help appreciated.

Viewing 1 replies (of 1 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    When you use the children / grand children categories in a post, do you also assign the parent category to the post?

    If so, then it might be easier to just exclude the parent category.

    If you use the children / grand children categories on their own, could you give me a few examples so I can run some tests?
    If you want your site URL to remain private, you can also contact us via this contact form:
    https://jetpack.com/contact-support/

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Related Posts – Exclude categories by parent category’ is closed to new replies.