A documentation search that also returns blog posts, or a portfolio search that returns pages, makes the site feel unfinished.
The Search Bar block can be locked to a single custom post type, so a bar placed in your docs section only ever searches docs.
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 registered, public custom post type with published items. Post types registered as non-public are not searchable.
Steps
- Select your Search Bar block and turn on the specific post type option.

- Choose the post type you want searched, then publish.

How It Behaves
- The chosen type is written onto the block before the page loads. Measured: with the option on, the block’s default data carried the flag and the chosen type name, and a hidden post type input was added to the form.
- The hidden input is what makes the non-AJAX fallback work, so a visitor without JavaScript still lands on a results page scoped to that type.
- It applies to every search from that bar. There is no All option to escape it, which is the point.
- 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.
- It degrades to an ordinary search. The block renders a real
<form method="get">pointing at your site root, so with JavaScript disabled the bar still submits and lands on WordPress’s own search results.
Limitations
- A post type dropdown overrides it. Measured: when a filter field with a post type source is present, the hidden input is not added, and the dropdown decides the type instead. Use one or the other, not both.
- One type only. To search across two custom post types, use a post type filter field listing both rather than this option.
- Non-public post types are not searchable, regardless of this setting.
- Custom fields on those items are not searched. Matching is on the standard fields; see the custom field doc for that.
Troubleshooting
It is still returning posts and pages
There is probably also a post type filter field on the block. That takes precedence. Remove it, or set it to the single type you want.
My post type is not in the list
It is likely registered as non-public, or registered with search excluded. That is set where the post type is registered, not here.
Nothing is found even though items exist
Only the title is matched by default. If your items have short or generic titles, enable content matching as well.










