Help Center

Filters Data Source Overview

Complete guide to data sources available in Radio, Select, and Checkbox filter settings of the JetSmartFilters plugin.

Taxonomies Source

The “Taxonomies” Data Source is available in the settings of “Select,” “Radio,” “Visual,” and “Checkboxes list filters. 

This source allows populating the filter options with a list of terms (categories or tags) and using them to filter by.

taxonomies data source in jetsmartfilters settings

For instance, we have a post type called “Properties” and an associated taxonomy called “Property Type”. Using the “Taxonomies” Data Source, we can filter posts of the “Properties” post type by terms of the “Property Type” taxonomy. 

Our taxonomy has five categories: “Bungalow”, “Cottage”, “House”, “Resort”, and “Villa”.

list of terms in custom taxonomy of jetengine

To filter posts by these terms, the “Taxonomy” Data Source should be selected in the filter settings.

setting up taxonomies data source in checkbox filter

As a result, the filter will be populated with the list of categories as filter options.

checkbox filter by custom taxonomy

The list of settings for the “Taxonomies” Data Source includes: 

  • Taxonomy — in this drop-down menu, one needs to choose the taxonomy that will be used for filtering;
  • Relational Operator — this feature is available in the Checkbox filter. It has two available options. The “Union” operator will display results corresponding to at least one of the selected checkboxes. For example, if “House” and “Villa” options are selected, items belonging to either category will appear. For the “Intersection” option, the result is vice versa. Only items that belong to both “House” and “Villa” options will be displayed;
  • Show empty terms — if this toggle is on, the empty terms that have no items assigned to them will also be shown on the list;
  • Show only childs of current term — on the parent category archive, only its child categories will be shown. On all other pages, all categories will be displayed;
  • Group terms by parents — this option should be switched on to save the hierarchical structure where child terms are listed under the parent ones;
  • Is Checkbox Meta Field (Jet Engine) — this option should be enabled to filter items by the Checkbox meta field saved as an array, Select meta field saved as multiple select, Posts meta field saved as multiple, or Checkbox meta field of ACF. This option is mainly used for filters with the Custom Fields source;
Things to know

The Is Checkbox Meta Field option should be disabled if the “Taxonomies” Data Source is selected. This option should only be enabled when filtering by custom meta fields mentioned above.

  • Exclude/Include — is used to include or exclude some of the terms, so they will be or won’t be shown in the options list.
Things to know

The “None” option in the Exclude/Include setting should be chosen if no terms should be included or excluded. Otherwise, it will create an error in the filter.

  • Use Custom Query Variable — this setting is unrequired for the “Taxonomies” Data Source. This setting can be enabled to filter items related by the Relations feature of the JetEngine plugin. For example, if the given taxonomy is the child object or the parent object in a relation, it is possible to use this taxonomy for filtering the related objects. Follow another tutorial to find more information on how to filter related items.

Manual Input Source

The “Manual Input” Data Source is available in the settings of “Select,” “Radio,” “Visual,” and “Checkboxes list filters. 

This source allows completing the filter options manually.

manual input data source in jetsmartfilters

In the Options List area, the options for the filter can be manually added. The Label field is the human-readable option name; it will be displayed to users on the front end. The Value field is the value that will be used in the filtering process. The filter will look for a match between the provided option value and filtered item values. 

For instance, there is a “Checkbox” Meta field named “_facilities” created in a Custom Post Type called “Properties.” The meta field lists facilities that can be included in properties. There is a total of twenty facilities in the “Checkbox” Meta field, but we want to have only three of them in the filter — “Wi-Fi,” “Gym,” and “Dining Area.”

checkbox meta field type in jetengine post type

In this case, we need to copy the values of the “Checkbox” Meta field options to the options’ values in the filter.

configuring manual input options in checkbox filter of jetsmartfilters

The filter will look for a match between the values of the filter options and the values of the “Checkbox” Meta field and display those items in filter results where the match is found. If a property has a “Wi-Fi” option selected in the meta field, this property will be listed in filter results when the “Wi-Fi included” option is picked in the filter. However, it is not required to match the option labels.

Things to know

The “Manual Input” Data Source is not the only way to filter items by meta fields. The “Custom Fields” Data Source or “JetEngine Glossary” Data Source options can also be picked to create a filter by a multi-optional meta field like “Select,” “Radio,” or “Checkbox” Meta field types. Then, it will not be required to populate the filter options manually as the filter will automatically load the data from meta fields.

The list of settings for the “Manual Input” Data Source includes: 

  • Is Checkbox Meta Field (Jet Engine) — this option should be enabled to filter items by theCheckbox” Meta field saved as an array, “Select” Meta field saved as multiple select, “Posts” Meta field saved as multiple, or “Checkbox” Meta field of ACF;
  • Query Variable — this setting is required. When filtering by a meta field, copy and paste the Name/ID of the meta field into the Query Variable field. For multiple field keys, separate them with commas.
configuring manual input checkbox filter by checkbox meta field
Things to know

The “Manual Input” Data Source allows not only filtering by a meta field. If the “Taxonomy” option is selected in the list of query variables, it will filter posts by the chosen taxonomy. In this case, use term IDs as options values in the Options List area.

Posts Source

The “Posts” Data Source is available in the settings of “Select,” “Radio,” “Visual,” and “Checkboxes list filters. 

This source allows populating the filter options with a list of posts from the chosen post type and using these posts to filter by. This Data Source is frequently used for filtering related items or filtering by a “Posts” Meta field.

posts data source in jetsmartfilters

The list of settings for the “Posts” Data Source includes: 

  • Post Type — in this drop-down menu, one needs to choose the custom post type that will be used for filtering;
  • Is Checkbox Meta Field (Jet Engine) — this option can be enabled to filter items by theCheckbox” Meta field saved as an array, “Select” Meta field saved as multiple select, “Posts” Meta field saved as multiple, or “Checkbox” Meta field of ACF. This option can be activated to filter posts by the “Posts” Meta field of JetEngine, which is saved as Multiple. If the Multiple switcher is disabled in the “Posts” Meta field’s settings, keep the Is Checkbox Meta Field setting disabled.
  • Exclude/Include — here, the filter options list can be limited to those included with the Include option or exclude certain posts with the Exclude option. 
  • Query Variable — this setting is required. When filtering by a “Posts” Meta field, copy and paste the Name/ID of that meta field into the Query Variable field. When filtering by related items, select the “JetEngine” option in the list of query variables.
query variable settings in jetsmartfilters

Custom Fields Source

The “Custom Fields” Data Source is available in the settings of the “Select,” “Radio,” and “Checkboxes list filters. 

This source allows filtering items by meta fields. Unlike the “Manual Input” Data Source, the “Custom Fields” Data Source does not require populating the filter options manually; it loads the data automatically from meta fields. This source works with “Checkbox,” “Radio,” and “Select” Meta fields

custom fields data source in jetsmartfilters settings

The list of settings for the “Custom Fields” Data Source includes: 

  • Custom Field Key — in this field, the name of the meta field should be inserted;
  • Get Choices From Field Data — the setting makes the filter populate the filter options from the options of the meta field;
  • Field Source Plugin — the dropdown becomes available if the Get Choices From Field Data is enabled. The “JetEngine” option works with JetEngine meta fields, while the “ACF” option works with ACF meta fields;
  • Is Checkbox Meta Field (Jet Engine) — this option can be enabled to filter items by theCheckbox” Meta field saved as an array, “Select” Meta field saved as multiple select, “Posts” Meta field saved as multiple, or “Checkbox” Meta field of ACF
  • Query Variable — in this field, paste the name of the meta field that will be filtered.

For example, there is a “facilities” Checkbox Meta field created in a Custom Post Type to be filtered.

checkbox meta field type in jetengine post type
Things to know

Don’t forget to enable the Save as array toggle in the settings of the “Checkbox” Meta field. If the Save as array option was not enabled previously, enable it and resave all posts so that the value of the “Checkbox” Meta field is stored properly in the database. Otherwise, the filter will not work correctly.

In this case, we need to copy the name of the meta field from the Name/ID field and paste it into the Custom Field Key and Query Variable settings of the filter. 

To make the filter populate its options automatically, enable the Get Choices From Field toggle and select the “JetEngine” option as the Field Source Plugin. Since we filter by a “Checkbox” Meta field, Is Checkbox Meta Field (JetEngine) toggle should be enabled.

setting up checkbox filter with custom fields source by a checkbox meta field

In the result, the filter will be completed with options from the meta field and will filter posts by these options.

building checkbox filter by checkbox meta field with jetsmartfilters

JetEngine Custom Content Types Source

The “JetEngine Custom Content Types” Data Source is available in the settings of “Select,” “Radio,” “Visual,” and “Checkboxes list filters. It requires the JetEngine plugin to be activated and its Custom Content Types module to be enabled. 

This source allows filtering CCT items by their custom fields. Works with “Checkbox,” “Radio,” and “Select” custom fields.

jetengine custom content types data source in jetsmartfilters settings overview

The Query Variable field expects the custom field’s name from the settings of the Custom Content Type.

configuring checkbox filter by custom content type field in jetsmartfilters

The filter will generate options automatically from the custom field provided in the Query Variable field.

Things to know

If the custom field gets options from the Glossary, use the “JetEngine Glossary” Data Source type instead of the “JetEngine Custom Content Types” Data Source type as described below.

JetEngine Glossary Source

The “JetEngine Glossary” Data Source is available in the settings of “Select,” “Radio,” “Visual,” and “Checkboxes list filters. Requires the JetEngine plugin activated. 

The source generates filter options based on a Glossary.

jetengine glossary data source in jetsmartfilters settings

The list of settings for the “JetEngine Glossary” Data Source includes: 

  • Select glossary the dropdown presents a list of all created glossaries. Select the glossary that will be filtered by;
  • Is Checkbox Meta Field (Jet Engine) — this option can be activated to filter items by theCheckbox” Meta field saved as an array, “Select” Meta field saved as multiple select, “Posts” Meta field saved as multiple, or “Checkbox” Meta field of ACF; 
  • Query Variable — this field is obligatory for completing the filter settings. Here, the Name/ID value of the meta field that uses the same glossary should be put. It will allow filtering Custom Content Type items, Custom Post Type posts, and users by Glossary values. 

For example, in a Custom Post Type, there is a meta field of Checkbox type that gets options from a Glossary.

settings of a checkbox meta field by glossary created in jetengine

In this case, the Name/ID of that meta field is pasted into the Query Variable field in the filter settings. Also, we select the same Glossary and enable the Is Checkbox Meta Field (Jet Engine) toggle since the filtered meta field is a Checkbox meta field.

setting up checkbox filter by glossary values in jetsmartfilters

As a result, posts can be filtered by their selected Glossary options. Check our complete guide that explains how to set up a filter by Glossary step by step.

JetEngine Query Builder Source

The “JetEngine Query Builder” Data Source is available in the settings of “Select,” “Radio,” “Visual,” and “Checkboxes list filters. Requires the JetEngine plugin activated. 

This data source allows the generating of filter options from the results of a custom query. It is often used to filter posts by terms that should be ordered in a specific way. Or in case a user needs to generate filter options from a list of users with a particular value in their meta field. The number of possible use cases is limitless; this topic is covered in a more detailed guide on using custom queries as a filter source.

jetengine query builder data source settings in jetsmartfilters

Unlike the taxonomy, posts, or other data sources of JetSmartFilters that let us choose just some post type, taxonomy, or CCT overall, the custom query can have a more specific set of clauses to represent only explicit posts, terms, CCT items, users, etc. as options of a filter. 

The list of settings for the “JetEngine Query Builder” Data Source includes: 

  • Select Query — the dropdown presents a list of all created custom queries in the Query Builder tool of the JetEngine plugin. It is possible to select a custom query of any type, including SQL Queries;
  • Property to get Value from — defines the property based on which the filtering is performed. This property will be used as a value of the filter option;
  • Property to get Label from — defines how the option will be labeled;
  • Is Checkbox Meta Field (Jet Engine) — this option can be switched on to filter items by theCheckbox” meta field saved as an array, “Select” Meta field saved as multiple select, “Posts” Meta field saved as multiple, or “Checkbox” Meta field of ACF
  • Query Variable — this field is obligatory for completing the filter settings. When filtering by a meta field, copy and paste the Name/ID of the meta field into the Query Variable field. For multiple field keys, separate them with commas. Also, it is possible to select the Taxonomy option in the list of Query Variables to filter posts by terms. Another possible use case is filtering related items; for this purpose, select one of the JetEngine options from the dropdown.

For example, a Terms Query in the WordPress Dashboard > JetEngine > Query Builder > Add New directory can be built and listed terms from a custom taxonomy in alphabetical order. The purpose is to use this generated list of terms as a filter source to filter posts by.

ordering terms alphabetically in terms query of jetengine

According to the used query, the ID of the term is the Value, and the name of the term is the Label. The Preview results can be activated to see how these properties are named. The ‘term_id’ property represents the ID of the term, and the ‘name’ property presents the name of the term.

previewing results of a terms query created in jetengine

Now, let’s return to the settings of the filter.

using terms query as a source for checkbox filter in jetsmartfilters

Firstly, it is needed to select the created custom query in the Select Query drop-down. The Property to get Value from defines the property based on which the filtering will be performed. According to the used query, the ‘term_id’ property is the value. The Property to get Label from is what a user sees on the front end as a label of an option. According to the described case, the property containing the term’s name is ‘name.’ Finally, the Taxonomy option is selected as a Query Variable because posts should be filtered by terms. 

In the result, we get an ordered list of terms as filter options.

checkbox filter generated from a terms query of jetengine

JetEngine Query Builder Switcher Source

The “JetEngine Query Builder Switcher” Data Source is available in the Select and Radio filters’ settings. Requires the JetEngine plugin of 3.2.0 version and higher to be activated.

Things to know

The “JetEngine Query Builder Switcher” Data Source is not supported by the “Checkbox” Filter Type.

This data source type allows switching custom queries of JetEngine from the front end.

jetengine query builder switcher data source overview

The list of settings for the “JetEngine Query Builder” Data Source includes: 

  • Select Query — here, one picks multiple custom queries that should be switched by the filter on the front end. All kinds of custom queries are supported.
  • Query Variable — in the dropdown list of Query Variables, one should select “Switch JetEngine query.”

This Data Source can be used to switch queries of the same type using the preferred kind of filter — Radio or Select. The name of the filter option will be represented by the name of the custom query. 

As before, to display posts (or Users, Custom Content Type items, etc.) queried differently, one had to place several Listing Grid widgets/blocks/elements on the page and apply a separate custom query to each. Now, it is possible to use just one widget/block/element to display the queried items and switch the queries with a filter. 

For example, some posts should be displayed on a page. When applying the filter, only the newest posts are desired to be shown, those created within the last two weeks. Older posts should not be displayed. 

For this purpose, two Posts Queries should be created. The first Posts Query lists all posts and is named “All Posts”; the second Posts Query lists only posts created in the last two weeks and is named “Latest posts.” 

querying posts by publish date in posts query of jetengine

In each custom query, a Query ID should be defined. The Query ID should be the same in both queries.

defining a unique query id in query builder settings
Things to know

It is highly recommended to apply a Query ID to the switched custom queries. Otherwise, if multiple widgets/blocks/elements of the same provider are on the page, the filter will be applied to all of them. To prevent this from happening, all custom queries used in the filter should be given the same Query ID, which should later be pasted into the Query ID setting in the filter widget/block/element and the CSS ID field of the provider.

Once the queries are created, we select them in the settings of our Select filter. Also, we apply the Switch JetEngine query Query Variable.

configuring filter by jetengine query builder switcher

Now, it is time to display the items on the website. It can be done with a Listing Grid widget for Elementor so that a Listing Template can be built beforehand. 

The Listing Grid widget and the Select filter widget should be placed on the needed page. In the Listing Grid widget, the created Listing Template should be picked, and the “All Posts” custom query applied. In this way, the listing will display all posts initially.

applying a posts query to the listing grid widget in elementor
Things to know

Applying a custom query to the filtered provider is obligatory. If the Listing Template was already based on a custom query, applying the custom query in the settings of the filtered provider is not needed.

Also, the Query ID from the settings of the custom queries should be copied and pasted into the CSS ID field of the “Advanced” tab of the Listing Grid widget settings.

applying a css id to the listing grid widget in elementor

In the Select Filter widget, the created filter should be picked, the Provider set to “JetEngine” (because the “JetEngine” provider stands for the Listing Grid), and the Query ID pasted.

setting up a select filter by jetengine listing in elementor

Now, the filter is ready for use. When selecting the “Latest posts” option, the listing displays only the posts created in the last two weeks.

testing the jetengine query switcher on the front end

Search Filter Sources

The Search filter type provides two data sources:

  • Default WordPress search — with the help of this data source, the Search filter will look at the post title, post excerpt, and post content for a match with the searched value;
  • By Custom Field (from Query Variable) — this data source allows searching in meta fields. The filter will search in the values of meta fields listed in the Query Variable field. For multiple meta fields, separate them with commas.
search filter data sources
Things to know

The “By Custom Field” source does not allow searching in default properties like “Default WordPress search.” The “By Custom Field” source only supports meta fields. On the other hand, the “Default WordPress search” source supports only default properties. It is not possible to combine these two sources in one filter.

That’s all about the filters data sources available with the JetSmartFilters plugin 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.