How to Create Predefined Filters Results with Dynamic Tag
Discover the JetSmartFilters and JetEngine Dynamic Tag feature that allows you to create predefined filter results on your WordPress website without any effort.
Before you start, check the tutorial requirements:
- JetSmartFilters plugin installed and activated with a filter built
- JetEngine plugin installed and activated with a provider built. For instance, it can be a Listing item.
Predefined Filter Results
Head to the Elementor page builder and add the filter and the Listing Grid widget to the website page.
In our case, we place the Checkboxes Filter widget on the page.
Pick the desired filter in the Select filter field and define its provider in This filter for field.
In the current case, we select the “JetEngine” option, referring to the Listing Grid.
If desired, work on further settings and click on the “Publish” button to save the changes.
Open the page where you want to place a widget that will redirect to the just edited page with the filter.
Select a widget that will trigger a page emergence. For instance, we will add a Button.
If you also work with the Button widget, in the General tab, leave the “Default ” option in the Type field and change the Text on the button if needed.
Head to the Link and push the “Dynamic Tags” button next to the field.
Select the “URL with filtered value” option in the drop-down list.
The Settings tab will now be opened:
- Base URL — paste the URL of the page where the filter and its provider are placed;
- This filter for — select the provider to which the filter is applied;
- Filter — choose a filter you have put on the page;
- Value — type an option value you want to be ticked in the filter. In the described case, we use the ID number of the term we want to be selected in the filter (as the filter Data Source was selected as “Taxonomy”);
- Query ID — paste the query ID value you may have used in the filter.
Leave the Advanced tab fields without changes and work on other settings if desired.
Hit the “Publish” button to save the page and look at the results.
As the page opens, you can hit the added button.
Once the button is clicked, it redirects the user to the page with the predefined filter results.
Predefined Filter Results with Several Options
Let’s place one more button that will lead to another Checkboxes Filter. But, this time, several options will be ticked.
We complete the Value field with the options separated by commas with no additional spaces. This time we put literal values as we work with the “Custom Fields” Data Source of the filter.
Our Value example looks like “meals,transport”.
All the other settings are adjusted to the filter we created earlier. So, we push the “Publish” button to save the result.
Now, the buttons are located on one page. Let’s press the second button.
If everything is adjusted fine, the button redirects to the page with the predefined results of the second filter.
As you can observe on the opened page, several options are selected now.
So, with the “URL with filtered value” dynamic tag, there is no need to select options again. Now you know how to show the predefined WordPress filter results with the JetSmartFilters plugin.