Help Center

Query Builder Overview

This overview reveals detailed information about all the settings of the JetEngine plugin’s Query Builder functionality.

Query Builder is a tool that helps you create lists of items picked up from the general array according to some conditions. It allows you to query posts, terms, users, comments, SQL tables data, repeater, WooCommerce products, items received via REST API functionality, Custom Content Type items, and reviews. 

Besides that, Query Builder allows you to query and display data that you wouldn’t be able to show otherwise, e.g., the information from your database tables.

Query Settings in the WordPress Dashboard

A new query can be added by proceeding to WordPress Dashboard > JetEngine > Query Builder and pressing the “Add New” button.

queries list dashboard

As the page appears, there is the main General Settings section presented.

query builder general settings
  • Name — a name that will be used for the current query;
  • Description — a text describing a query. It will be shown in the Queries List and can be used for info systematization;
  • Query Type — a list where the source for the query can be set. There are options presented that will be described further;
  • Query ID — an optional field that can be used to connect the query with the JetSmartFilters plugin’s filter. The ID set here should repeat the ID mentioned in the filter settings (Query Variable field) and the widget/block/element’s ID put in its settings.

As for the Query Type list, there are separate guides about the presented options:

Warning

Some of the mentioned Query Types appear in the list only if the particular plugin is installed and activated.

Depending on the picked Query Type, the further settings differ. So, the specific details can be checked in the tutorials presented above.

Query in Use

The Query Builder functionality can be used for different purposes. Here is the description of the widgets/blocks/elements where it can be applied:

Listing Grid

With the Query Builder functionality, many use cases can be implemented in the Listing Grid. For instance, here is a detailed guide on How to Display Featured Posts Using Query Builder.

Elementor

In the Custom Query tab of the Listing Grid widget, a Use Custom Query toggle should be activated. A needed item can be picked in the Custom Query field.

custom query for listing grid in elementor

Gutenberg

For the Listing Grid block, the same settings as in Elementor are available.

custom query for listing grid in gutenberg

Bricks

Bricks editor includes the same settings.

custom query for listing grid in bricks

Map Listing

Custom queries can also be used for Map Listings. As an example, a map can be queried by some meta fields related to the content. For instance, if the item is set to “Available,” it will be shown on the map.

Elementor

To work with custom queries in the Map Listing widget, one should activate the Use Custom Query toggle in the Custom Query tab. Then, the Custom Query field should be completed with the corresponding item.

custom query for map listing in elementor

Gutenberg

The Map Listing block has the same query settings as in Elementor.

custom query for map listing in gutenberg

Bricks

Bricks Editor also contains the same Map Listing settings as in Gutenberg and Elementor.

custom query for map listing in bricks

Dynamic Chart

The query can also be added as a part of a Dynamic Chart functionality. For the Dynamic Chart, the most common “Posts” query can be used where the needed post type for the query will be specified.

Dashboard settings

Its settings can be found by following the WordPress Dashboard > JetEngine > Charts Builder path.

The needed query can be selected in the Data Query field.

data query for chart

Dynamic Table

The How to Create a Dynamic Table Based on SQL Query article should be checked to determine how to build a suitable table for your needs.

Dashboard settings

Dynamic Table should also be provided with a query beforehand in the WordPress Dashboard > JetEngine > Tables Builder directory.

The Data Query field here is for the previously created query input.

data query for table

Elementor

After the Dynamic Table is created, the rest of the settings can be adjusted in the selected editor. 

Also, here, the other query can be set. To do so, one should activate the Rewrite table query. The New Query field should contain another query that has not been used before.

custom query for a dynamic table in elementor

Gutenberg

The same Dynamic Table settings are presented in the Block Editor.

custom query for dynamic table in gutenberg

Smart Posts List

Smart Posts List is similar to Listing Grid, so it can be queried in the same way. For example, posts can be put based on their author.

Elementor

To set a query for the Smart Posts List widget, the Query & Controls tab should be opened. Here, the Use Custom Query toggle is presented.

A query can be made custom in the Set custom query or already created in the Or use JetEngine Query Builder field.

custom query for smart posts list

Smart Posts Tiles

The Smart Posts Tiles widget also makes possible different ways of querying. For instance, the items it contains can be queried and put in descending order by date.

Elementor

Smart Posts Tiles settings match those in the Smart Posts List widget.

custom query for smart posts tiles

Text Ticker

Text Ticker can be customized in various ways using Query Builder. For instance, the posts of the last two days and only with a certain topic (category) can be displayed.

Elementor

The needed query options can be found in the General tab of the Text Ticker widget. 

The Use Custom Query switcher allows adjusting the needed item in the Select query from JetEngine Query Builder field.

custom query for text ticker in elementor

Advanced Carousel can be queried as well. For example, it can be used to display images, titles, and descriptions in a particular order.

Elementor

To enable a custom query in the Advanced Carousel widget, the Use JetEngine query toggle should be switched on in the Slides tab. The needed item should be picked in the Select Query field.

The rest of the steps are described after the Select Query field. The first item should be opened below, and the custom fields should be chosen with the Dynamic Tags button where available (next to the Image, Item Title, and Item Description fields.)

custom query for advanced carousel in elementor

Advanced Map

As for the Advanced Map widget, it can be adjusted and queried by “Repeater” meta fields.

Elementor

In this widget, the Use JetEngine query toggle can be found in the Pins section. The desired item should be picked in the Select Query field.

The Instructions section includes further information. 

The Pin Address and Pin Description can be customized in the item with the help of the Dynamic Tags button. In the mentioned fields, the corresponding custom fields should be connected.

custom query for advanced map in elementor

Query Loop

Custom queries can also be used with the Query Loop available with Bricks. For instance, they can be applied to the Query Loop and filtered.

Bricks

In the Query field, a “JetEngine Query Builder” Type should be selected.

custom query for query loop in bricks

Once the Type is set, the JetEngine Queries should be completed with a needed query.

jetengine queries field in query loop

That’s all about the Query Builder feature available as a part of JetEngine’s plugin functionality for your WordPress website.

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.