Croco Black Friday 2024 banner element
Copy discount code:
bfcroco2024
Days
Hours
Minutes
Croco Black Friday 2024 banner element
Help Center

AJAX Search Query Overview

This overview is about the AJAX Search Query and its general settings in Elementor, Gutenberg, and Bricks.

AJAX Search Query Feature in Elementor

The AJAX Search widget can be found by entering its name in the Elementor search bar.

After adding the AJAX Search widget on the page, one should open the AJAX Search Query settings. 

The Search by the current query toggle should be activated to search in the current query only.

search by current query

To search in posts, pages, WooCommerce products, and CPTs created with JetEngine, the previously mentioned Search by the current query toggle should be deactivated, and the search scope can be specified in the Source field. The search area will cover the entire website content if this field is empty.

source field
Things to know

This field allows applying several sources simultaneously.

options selected in the source field

The following tabs are Include and Exclude. Here, certain Terms can be included, and Terms and Posts can be excluded from the search.

terms selected in elementor

The Search in custom fields field allows searching in the provided meta fields.

search in custom fields in elementor

The Sentence Search toggle, if enabled, allows searching in sentences.

sentence search toggle in elementor

Enabling the Search in taxonomy terms toggle allows specifying the search area as categories, tags, formats, etc.

taxonomies field in elementor

This setting is connected with the Content section of the Search Form settings tab. Therefore, to provide the proper search, one should enable the Show Categories List toggle from the Search Form tab and specify the area for the search (as categories, tags, etc.) from the drop-down menu.

show categories list toggle in elementor

The last four settings cover the display of search results:

results and posts settings in elementor
  • Results Order By — enables the selection of result order presentation by choosing “Relevance,” “ID,” “Author,” “Title,” “Date,” “Last modified,” “Rand,” “Number of Comments,” and “Menu Order” options from the drop-down menu;
  • Results Order — sets the “ASC” (default) or “DESC” order;
  • Posts Per Page — has a field to type the number of results displayed on one search page;
  • Posts Number — specifies the number of results in one search query.

Turning on these settings proceeds with the necessary search results.

AJAX Search Query Feature in Block Editor

The Ajax Search block can be found in the Block Editor as well.

ajax search in the block editor

The Search Query is the third setting tab of the AJAX Search block. Initially, the Search by the current query toggle should be activated to conduct a search based on the current page context. This toggle should also be enabled for archive pages.

search by the current query in the block editor

If this toggle is disabled, the specific Source search covers the possibility of searching in particular areas, such as posts, pages, landing pages, and custom posts developed with the JetEngine plugin. If the Source field is empty, the search will be conducted in all site data.

source field in the block editor

The SEARCH IN CUSTOM FIELDS bar allows setting meta field keys to search their data with the search bar.

search in custom fields in the block editor

Besides, searching in complete sentences is possible by turning on the toggle Sentence Search. 

Enabling the next Search in taxonomy terms toggle allows including the search results in the posts with terms of the selected Taxonomies.

search in taxonomy terms toggle in the block editor

The following four settings control the search result appearance. They are:

the last part of the settings in the block editor
  • Results Order By — has the drop-down menu to arrange results by “Relevance,” “ID,” “Author,” “Title,” “Date,” “Last modified,” “Rand,” “Number of Comments,” and “Menu Order”;
  • Results Order — puts results in the “ASC” or “DESC” order;
  • Posts Per Page — specifies the number of results displayed on the search page;
  • Posts Number — defines the number of results displayed in one search query.

The separate tab of Search Query Includes/Excludes settings to include/exclude specified terms from the search results. Besides, this tab allows excluding posts.

search query includes or excludes tab in the block editor

AJAX Search Query Feature in Bricks

The Ajax Search element is available for the Bricks Builder. Its name should be put in the search bar to add the element to the page.

The Search Query tab includes the same customization fields as Elementor and Block Editor

The Search by the current query switcher should be left active to search in the current page query context.

search by the current query in bricks

If the previously mentioned feature is disabled, the source for searching can be selected among several options in the Source field.

source field in bricks

The following section is called Include and allows adding specific Terms to the search.

include tab in bricks

In the Exclude section, particular Terms and Posts can be excluded from the search.

exclude tab in bricks

The Search in custom fields bar allows specifying the meta fields to search among their data.

search in custom fields in bricks

The Sentence Search toggle lets users search information based on the complete sentences.

sentence search toggle in bricks

Once the Search in taxonomy terms switcher is activated, the search for taxonomies items is enabled. So, if the name of the taxonomy is entered in the search bar, posts that are connected to this taxonomy will be displayed as results.

The Taxonomies can be specified in the following field; otherwise, the search will be conducted among all the taxonomies available on the website.

search in taxonomy terms toggle in bricks

The rest of the settings can also be adjusted in Bricks:

the last part of the settings in bricks
  • Results Order By — allows arranging results by “Relevance,” “ID,” “Author,” “Title,” “Date,” “Last modified,” “Rand,” “Number of Comments,” and “Menu Order”;
  • Results Order — displays results in the “ASC” or “DESC” order;
  • Posts Per Page — adjusts the number of results shown on the search page;
  • Posts Number — specifies the number of results displayed in one search query.

That’s all about the AJAX Search Query available for Ajax Search in Elementor, Gutenberg, and Bricks.

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.