How to Set Indexer Option for Filters
From this tutorial, you will learn how to configure the JetSmartFilters Indexer option for filters and use it to index products or posts with JetSmartFilters functionality.
Before you start, check the tutorial requirements:
- JetSmartFilters plugin installed and activated
If you run an online shop or blog where you would like to add filters to sort products or posts, you can use the JetSmartFilters plugin. Let us introduce you to the Indexer, which is available in JetSmartFilters.
With this feature, you get the opportunity to save the filtering data in the database for further retrieval. In other words, only the results relevant to the selected filter will be displayed on the front end. The non-relevant results can be hidden or disabled.
This setup can be especially useful for WooCommerce filters indexer scenarios, as well as for blogs, directories, and custom listings.
We present an example based on filtering posts using JetSmartFilters.
Indexer Settings Overview
The first thing you should do is head to the WordPress Dashboard > Crocoblock > JetPlugins Settings directory. Go to the JetSmartFilters tab and open the Indexer Settings.
Here, you need to activate the Use Indexed filters toggle.
Another helpful option is to enable auto-indexing by toggling the Use auto re-indexing switcher. This feature will do the indexing itself without any further actions on your part.
Also, there is an Index Post Types list, where you can specify the post types that will be indexed.
This is the main part of the JetSmartFilters Indexer configuration, as it defines how the plugin stores and updates filter-related data.
After activating all the needed toggles, the changes will be saved automatically.
Managing JetSmartFilters Block in WordPress Dashboard
Proceed to the Smart Filters tab in the WordPress Dashboard. Here, you create the needed filters.
Click the “Index Filters” button to apply the indexer functionality after activating the JetSmartFilters plugin.
You should also click this button:
- after customizing filters or queries;
- after importing posts;
- after performing bulk updates;
- after publishing posts via JetFormBuilder forms (auto re-indexing does not trigger in this case).
If you have toggled the Use auto re-indexing switcher in the Indexer Settings, you don’t need to click the “Index Filters” every time. The auto-indexer will update the data itself.
When Auto Re-indexing Does Not Trigger
Auto re-indexing works when the posts are saved via the WordPress Dashboard. It does not work in such cases:
- Post is published via the JetFormBuilder form on the front end;
- Posts are imported via CSV or WP All Import;
- Posts are updated via REST API or WP-CLI.
In these cases, you should press the “Apply Indexer” button manually or set up a PHP trigger.
Adjusting Filter Widget
It is time to open the page where you have filters. We will take a Checkboxes Filter as an example.
In the JetSmartFilters widget’s settings, you find the Indexer Options tab, where you should enable the Apply Indexer option.
The Show Counter option allows showing the number of items of each product. Also, you can show, hide, or disable an item in the filter if it is empty.
In addition, select whether counters should be changed when filters are applied in the Change Counters drop-down list.
Connecting the Indexer with the Custom Query and the Provider
Another important step is to connect the filter, its provider, and query (if you work with the query) with the same ID.
So, when working with the query, set the desired ID in the Query ID field.
In the filter settings, enter the same ID in the Query ID field.
In the provider settings, set the ID in the CSS ID field of the Advanced settings if you work with Elementor.
If you work with Bricks, you can complete the CSS ID field in the CSS section of the STYLE tab.
When you have set all the needed adjustments, click the “Publish” button.
Viewing Result on Front End
Important Notes
- The Indexer is available only for “Checkboxes”, “Select”, “Check Range”, “Visual”, and “Radio” filters;
- Meta field values used as filter options should be written in Latin without spaces or special characters. Otherwise, the indexer will ignore them;
- If the indexer doesn’t work, check our Indexer Does Not Work troubleshooting.
Now you know how to show the number of items for each product using JetSmartFilters Indexer functionality on your WordPress website.









