How to Filter CCT Items by Date of Creation and Modification
In this guide, you will find out how to create JetSmartFilters’ “Date Range” and “Date Period” filters that will filter JetEngine’s Custom Content Type items by date of creation or modification.
Before you start, check the tutorial requirements:
- JetEngine plugin installed and activated with the Custom Content Type created and items added to it
- JetSmartFilters plugin installed and activated
Filter by Creation Date
Initially, let’s add a filter by the Custom Content Type items creation date.
Create a filter
Head to WordPress Dashboard > Smart Filters > Add New to build a new filter.
Name a filter (in our case, “Date Range” Filter Name) and select the “Date Range” or “Date Period” Filter Type. Now, we pick “Date Range.”
In the following Filter by selector, pick the “Meta Date” option.
Work on the following settings if desired.
Now, pay attention to the Query Variable field. In this field, paste the “cct_created” macro.
Also, complete the Filter Labels section and ultimately press the “Update” button to save the filter.
Build a listing template
Next, we should build a Listing template for the CCT we work with.
To do this, we go to WordPress Dashboard > JetEngine > Listings/Components. Here, press the “Add New Item” button.
In the opened pop-up, select “Custom Content Type” as the Listing source, select the needed CCT in the From content type dropdown, name the listing in the Listing item name field (in our case, “Tour Location Listing”), and pick the Listing view (now we select “Elementor.”)
Press the “Create Listing Item” button to proceed to the editor.
In this Listing template, we place the Dynamic Field widget with the CCT item’s “Location Name” (a “Text” meta field) and the Dynamic Image widget with the “Location Image” (a “Media” meta field). Add the widgets you need.
When all the needed widgets are added, publish the Listing template.
Add the filter and the listing to the page
Now, proceed to the page/template where you want to place a filter and a listing.
Add a Date Range Filter/Date Period Filter widget to the page. In the Select filter field, pick a filter you built earlier and the “JetEngine” option in the This filter for field.
Make other changes to the widget if desired.
Now, add a Listing Grid to the page. In the Listing field, select a Listing template you have built.
Work on the other Listing Grid settings and, when the page is ready, save it.
Check the result
Now, it’s time to check the result. Proceed to the front-end page you have just edited.
Select the dates to check the CCT items that were created during this time period, and if everything works fine, you will see the filtered listing.
Filter by Modification Date
Now, let’s check how to build a filter by the CCT item modification date.
Create a filter
Navigate to the WordPress Dashboard > Smart Filters > Add New dashboard.
Complete the Filter Name (here, “Date Period”) and pick the Filter Type: “Date Period” or “Date Range”. Now, we select the “Date Period” option.
In the Filter by dropdown, pick the “Meta Data” option and change the Period Type if needed.
Work on other settings fields if desired as well.
Then, scroll down to the Query Variable field and paste the “cct_modified” value in there manually.
Ultimately, complete the Filter Labels in the same-named section and save the filter by pressing the “Update” button.
Build a listing template
Now, build a listing for CCT items if you haven’t done so. We have built one already; check the instructions in the Building a listing template chapter of this guide.
Add the filter and the listing to the page
Navigate to the page/template where you want to place the filter and the Listing Grid.
Add a Date Period Filter/Date Range Filter widget to the page.
Pick the built filter in the Select filter field and the “JetEngine” provider in the This filter for selector. Work on other widget settings if needed.
Now, add a Listing Grid widget to the page.
Select the pre-built Listing and make the necessary changes to the ListingGrid and the page itself, then save the page.
Check the result
Now, proceed to the front-end page to check the result.
When the needed dates are selected, the Listing Grid will be filtered.
That’s it; now you know how to filter JetEngine’s Custom Content Type items by date of creation and modification with the help of the JetSmartFilters plugin for WordPress.













