How to Set the Search Only for Specific Post Types
This tutorial explains what steps you need to take to set the Search only for specific post types with the JetSearch plugin for Elementor and Gutenberg.
Sometimes you want to arrange the search results so that in the corresponding field, there are posts only. It’s easy to perform, especially with the JetSearch plugin. All you need is to follow the given manual.
Setting Search Only for Specific Custom Post Types in Elementor
Place the AJAX Search widget and head to the Search Query block. Here you can see settings for arranging search results. Moreover, you can range the results by the chosen parameter, such as data or relevance, etc.
Navigate to the Source option. Select the needed option — for instance, WordPress “Posts” or other custom post type.
Press the “Publish” button to make the page live.
Setting Search Only for Specific Custom Post Types in Gutenberg
The same settings are available for the Block Editor. Just open the page and place the AJAX Search block on it.
Then select the source of the search in the Search Query section.
Pay attention that you can also customize the style settings in Gutenberg. To do so, you can install and activate the JetStyleManager plugin and press the brush-shaped icon in the editor.
Hit the “Publish” button once you specify the source and finish all customizations.
Now check whether the search works correctly on the front page.
Now you can make it real to set the search for posts only.