Help Center

How to Include Certain Terms in the AJAX Search Widget’s Search Query

How to Include Certain Terms in the AJAX Search Widget’s Search Query

Read how to use the JetSearch AJAX Search widget for adding a search in specific terms to the page.

Before you start, check the tutorial requirements:

  • Elementor (Free version) or Block editor (Gutenberg);

  • JetSearch plugin installed and activated;

  • JetEngine plugin installed and activated with Custom Post Type built with posts and terms added.

The JetSearch plugin allows including and excluding specific terms in which to look for. You can specify the appropriate terms of posts, products, and custom post types that search will be implemented only in a specific area. Let us present how to include a particular term in the AJAX Search block/widget’s search query.

Including Specific Terms in a Search Query of Gutenberg Page

Go to the page where you want to add a search bar and add the AJAX Search block to an appropriate place.

Head to the Search Query Includes/Excludes section and select the needed term(s) for including in the corresponding field.

After making all the desired changes, press the “Publish/Update” button to save the result.

search query includes terms field in gutenberg

In our case, we have some default posts, information about which is displayed with the help of the Listing Grid widget on the blog page. We would like to search in the default posts with the Business tag, so we set appropriate adjustments in the AJAX Search widget.

wordpress posts tags

Adjusting Search in Terms in Elementor

This time we will place the search bar in the header and then attach it to the desired page.

Add the AJAX Search widget, and you’ll see the settings block on the left. Open the Search Query section and specify the search areas in the Search option. In the Include option, you need to define certain terms, which will be considered by searching.

Work on other settings and hit the “Publish/Update” button to save the search.

search query terms field in elementor

Save the changes on the page. Now you can view the search in action on the front end.

terms search on the front end

At the moment, you know how to set search in the posts with specific terms in the JetSearch AJAX Search widget.

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.