Croco Black Friday 2024 banner element
Copy discount code:
bfcroco2024
Days
Hours
Minutes
Croco Black Friday 2024 banner element
Help Center
Merged Query Type in the Query Builder Overview

Merged Query Type in the Query Builder Overview

This overview describes all the Query Builder’s Merged Query type settings, which are part of the JetEngine plugin.

The JetEngine plugin’s “Merged Query” Query Type allows for combining the results of multiple queries into one. For example, it can be used to combine posts based on different criteria into a single Listing Grid.

General Settings

In the WordPress Dashboard > JetEngine > Query Builder directory, the query adjusting starts from the following settings:

query builder merged query general settings
  • Name — a field where the name of the query should be put;
  • Description — a short description of the query features that helps for easy navigation in the list among the built queries;
  • Query Type — a type of query. In the given case, a “Merged Query” should be picked;
  • Query ID — an optional field to connect a query to JetSmartFilters. The value set here should be identical to the one used in the filter;
  • Cache Query — a toggle activated by default. It caches the current query and can be deactivated in case of incorrect query results;
  • Register Rest API Endpoint — a toggle, if enabled, activates settings with which a WordPress Rest API endpoint can be registered to grant public access to query results and allow remote retrieval of current query data. For example, the endpoint can be used in the Make.com scenarios or as the backend for mobile applications. A detailed description of all options can be found in the Register Rest API Endpoint chapter of the Query Builder Overview.

Merged Query Settings

The Merged Query tab includes the following fields for customization:

query builder merged query settings
  • Query Type — a dropdown menu for selecting the type of queries to be merged. Be aware that currently, only queries of the same type can be merged, i.e., posts with posts, terms with terms, etc. For now, only such query types are supported: “Posts,” “Terms,” “Users,” and “Comments”;
  • Exclude Duplicated Items — a toggle, if enabled, items shown in previous queries on this page will be excluded from all subsequent queries;
  • Max items per page — a field to set the maximum number of items displayed per merged query page. If a number N is specified, the query will return up to N results per page. For each subsequent query, the number of items per page will be adjusted so that the total does not exceed N. If this field is left empty, the query will return the number of items based on the settings of each nested query;
  • Queries to merge — a repeater field to add specific queries to merge by clicking the “Add new query” button. Per click on the button, it adds a dropdown to pick a Query of the specified Query Type.
add queries to merge

Logic and Limitations

The “Merged Query” is a query type designed for solving specific tasks, and due to this specificity, it has certain limitations:

  • It cannot work correctly with the Indexer option of JetSmartFilters. This query combines the results of different queries, causing the Indexer to be unable to determine which arguments to use for calculating the results;
  • There may be problems with pagination. The logic is similar to that of the Indexer: since the query combines the results from different queries, each with its own number of pages, the total number of pages may sometimes be calculated incorrectly.

That’s all about the “Merged Query” Query Type based on the Query Builder functionality from JetEngine 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.