> For the complete documentation index, see [llms.txt](https://documentation.ajaxsearchpro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ajaxsearchpro.com/advanced-options/excluding-and-including-results/exclude-by-category-or-terms.md).

# Exclude by category or terms

## Excluding Posts or any Custom Post Type by categories or terms

`Advanced Options -> Exclude results` panel

![](http://i.imgur.com/NfgVM8z.png)

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:

![](http://i.imgur.com/A6v6f1i.png)

## 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.
