A blog search that returns your privacy policy and three product pages is not much use to a reader looking for an article.
Restricting the Search Bar to posts is a single setting, and it is the one that makes the results feel deliberate.
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.
- Published content to find. The block searches your real posts, so a site with nothing published returns nothing.
Steps
- Select your Search Bar block, open Extra Option, and switch on Only for specific CPT.

- Set CPT Type to Posts.

- Publish and search for the title of an article you know is live.

There is also a per-field post type source in Search Bar Fields, with a Post/Taxonomy toggle, that looks like it does the same job. Measured on 5.0.6: choosing Post there saves with no post type attached and has no effect on the search — no dropdown renders on the front end and nothing is restricted. Only for specific CPT, used above, is the setting that actually works. Reported to the developers.
How It Behaves
- The post type is written into the query before it runs. Measured with Only for specific CPT set to Posts: a term returned 4 results; the same term unrestricted returned 15 across all types.
- It is one type at a time. Measured: the setting takes a single CPT Type value — Posts, Pages, Products or any registered custom post type — not a combination.
- 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. - The excerpt line only appears when the post has one. Measured: posts with an empty excerpt render a card with no excerpt at all, which can make a result list look uneven.
Limitations
- Only published posts are searched. Drafts and private posts never appear, which is correct but surprises people testing with a draft.
- It restricts the whole search bar, not one field among several. There is currently no working way to offer a visitor a choice of post types in one instance — see the note above.
- Show All Result does not currently render usable cards. Measured on 5.0.6: the pre-loaded list renders three empty placeholders with no title, thumbnail or link, and ignores the result count you set. Reported to the developers. Leave it off and let the visitor search.
Troubleshooting
Pages are still showing up
Check that Only for specific CPT is switched on and CPT Type is set to Posts, not left on its default.
I added a filter field instead and it is not restricting anything
Expected on 5.0.6 — the per-field post type source does not work (see the note above). Use Only for specific CPT instead.
An article is missing from the results
By default only the title is matched. Turn on content matching if you want the body searched too.










