Stand with Ukraine. Fight for freedom and democracy

Donate
Back to contents

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

Keep reading this tutorial if you want to use the JetSearch AJAX Search widget for adding a search in specific terms to the page.

Tutorial requirements:

  • JetSearch  and JetEngine plugins installed and activated;
  • CPT built with JetEngine, posts, and terms added to it;
  • WordPress Gutenberg Editor or Elementor Page Builder free version.

Table of Contents:

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.