[Block]: Query Loop - Add ability to limit search results by post type #70195
Labels
[Block] Query Loop
[Feature] Full Site Editor
The site editor.
[Platform] Atomic
[Platform] Simple
[Pri] Low
Address when resources are available.
[Type] Feature Request
Feature requests
What
Add the ability to limit search results to certain post types in the Query Loop block.
Why
Allowing search results to filter by post type would mean users could easily set up a search for posts, portfolios, recipes, etc - which would be a nicer experience for their readers.
In FSE themes, the Search template uses the Query Loop block to display results - but you can't limit what those results include. Disabling
inherit query from template
breaks the search results altogether, and this is the only way to filter the Query Loop block to a specific post type.Without such a filter, static pages also appear in search results, which can deliver a less sophisticated experience, like in this user example from 38075901-hc :
Workaround
Supplying some CSS works as a way to hide Pages from search results for now, such as:
How
No response
The text was updated successfully, but these errors were encountered: