Exclude by category or terms

Excluding Posts or any Custom Post Type by categories or terms

Advanced Options -> Exclude results panel

  1. Scroll down on the Advanced Options -> Exclude results panel

  2. Select a taxonomy, then drag the terms (categories) from the left box to the right box to exclude.

  3. Save the options, done.

Posts (or any post type objects) types marked with the excluded categories won't show up on the results list.

Hiding posts (or any CPT) with no categories or terms

By default, selected post type objects which are not associated with any terms will appear in the results list.

If you whish to exclude them as well, then trun OFF the Show posts/CPM with empty taxonomy terms? option on the Frontend Search Settings -> Advanced panel:

Further notes

Category and taxonomy term exclusion will drop posts belonging to at least one of the excluded categories. This way if some posts belong to a certain parent->child1 category and other belong to parent->child2 category and category "child1" is excluded, then the posts from category "child2" will still show up.

Excluding the parent category will however exclude all the posts belonging to the child categories as well, as it's expected.

Last updated

Copyright Ernest Marcinko