A category dropdown lets the visitor choose. Sometimes you want to make the choice for them — a search bar inside a documentation section that never returns marketing pages, or a store search that skips discontinued lines.
The include and exclude settings fix the scope of the search before anyone types anything.
For every Search Bar setting in one place, see the Search Bar guide.
Before You Start
- Edition: Free. Measured with Nexter Blocks Pro deactivated, the Search Bar renders identically — form, input, dropdowns, suggestions and results all work without Pro.
- Block to enable: Search Bar, switched on under Nexter > Blocks in your WordPress dashboard.
- A taxonomy with terms in use. You choose the taxonomy first, then the terms to include or exclude from it.
Steps
- Select your Search Bar block, choose the taxonomy to limit by, then add terms to include or exclude and publish.

How It Behaves
Include and exclude are exact complements. Measured on a site of 14 posts against one category term: including it returned 2, excluding it returned 12.
- Include restricts the search to those terms. Nothing outside them can be returned, whatever the visitor types.
- Exclude removes those terms from the search. Everything else remains searchable.
- Child terms are included. Both conditions are applied with children counted, so including a parent category covers its sub-categories.
- It is invisible to the visitor. There is no dropdown and no indication that the search has been narrowed, which is the intent but also worth knowing.
- Both settings need a taxonomy chosen. Measured: terms with no taxonomy selected are ignored entirely.
- Only the title is searched by default. Measured: with the default settings a term matched 4 posts by title; switching the search fields off entirely fell through to WordPress’s own query and matched 15.
Limitations
- One taxonomy at a time. You cannot include by category and exclude by tag on the same bar.
- Terms are stored by ID. Deleting and recreating a term breaks the setting silently, because the new term has a different ID.
- The visitor gets no explanation. If someone searches for something you have excluded, they see an empty result and no reason for it. A clear no-results message helps.
- It does not replace a filter dropdown. Use include and exclude to set a fixed scope, and a filter field when the visitor should choose.
Troubleshooting
The terms I entered have no effect
A taxonomy has to be selected as well. With terms set but no taxonomy chosen, both lists are ignored.
The search stopped returning anything after I edited my categories
Terms are stored by ID. If a term was deleted and recreated, re-select it here.
Results from a sub-category are appearing even though I only included the parent
That is correct. Child terms are included by design.
I want the visitor to choose instead
Use a taxonomy filter field, which renders a dropdown. See the category search doc.










