Back to contents

JetSmartFilters. How to filter publications by values from the meta fields. Manual input data source

Continue reading this tutorial in case you want to learn how to filter publications by values from their meta fields using JetSmartFilters functionality.

It is possible to filter publications by their meta data with JetSmartFilters plugin via setting the meta values by creating a new filter.

Filtering publications by meta field values

Step 1 – First of all, make sure that publications have needed meta fields. In our case, there is Number of People meta field of Events custom post type.

Number of People meta field of Events custom post type

Step 2 – The next action you need to do is to go to SmartFilters block in the WP Dashboard and click the Add New button for creating a new filter. We create a Select filter and choose the Data Source: Manual Input in the Filter Settings tab.

Filter Settings tab for the filter settings in WP Dashboard

Step 3 – You will see the options list below right here, where you need to input the meta values with appropriate labels for filtering.

value and label fields of Options List

Step 4 – Also you need to paste the meta field name in the Query Variable option.

Query Variable option in the Events custom post type

Step 5 – Now the meta values for the Number of People option in the Events custom post type are available. We should specify the number of people for each event.

Number of People option in the Events custom post type

Step 6 – Then, we open the page, where we have a listing and want to add a Select filter in Elementor editor and find the Select Filter widget in the panel on the left. We drop it in the certain section and see the settings window, where we need to select the created filter, specify the content widget (in our case it’s JetEngine Listing Grid) and adjust other varied options. Make sure you have saved the changes.

Select Filter widget content settings

Step 7 – At the moment we are going to preview how the posts are filtered by values from the meta field via the Select filter type.

Select filter overview

Great! Hope, this tutorial was useful for us and now you know how to filter publications by values from the meta fields using JetSmartFilters plugin.