How to Create a Dropdown Post Title Filter Using Smart Filters

June 02, 2024

Smart Filters is a module of Crocoblock Wizards, used to create advanced filters in WordPress.

Today, I’m going to show how we can build a Post Title Filter. Here, I’m using “Job” which is Custom Post Type (CPT).

Step 01: Creating Query using JetEngine Query Builder:

As, I’m showing with Job, so first I need to build a query for Job Title to get values from the database.

We need to go to WP Dashbaord> JetEngine> Query Builder> Add New
Write down the following properties

Properties: General Settings Section

Query Name: Job Title Query
Query Type: Posts Query

Create a Dropdown Post Title Filter Using Smart Filters

General Settings | JetEngine Query Builder

 

Properties: Post Query Section

Post Type: Jobs (or select your desired CPT)
Post Status: Published (as I want to filter only for those Jobs which are published)
Optional: Set Pagination or Author (If needed)

Create a Dropdown Post Title Filter Using Smart Filters

Pst Query Section | JetEngine Query Builder

 

Save the query

Now, need to save the query by clicking the “Add Query” button on the right side under the Actions.

Create a Dropdown Post Title Filter Using Smart Filters

Save Query | JetEngine Query Builder

 

Preview Results

We can see if this query works or not by enabling “Preview results”.

Here, 65 results are found which are already published

Create a Dropdown Post Title Filter Using Smart Filters

Preview Results | JetEngine Query Builder

 

Step 02: Creating Filter using JetEngine Smart Filters:

We need to go to WP Dashboard > Smart Filters > Add New

Write down the following properties

Properties

Filter Name: Post Title
Filter Type: Checkboxes List
Data Source: JetEngine Query Builder
Select Query: Post Title Query (This is the query we build in the first step)
Property to get Value from: ID
Property to get Label from: post_title
Query Variable: hidden_post_id
Smart Filters: Jobs
Active Filter Label: Jobs

Create a Dropdown Post Title Filter Using Smart Filters

Creating Filter | Smart Filters

 

Create a Dropdown Post Title Filter Using Smart Filters

Creating Filter | Smart Filters

 

Step 03: Implementation

We can implement the filter using Gutenberg, Elementor or Brick Builder. Here, I’m using Elementor.

Page/Template > New > Edit with Elementor > Container > Checkboxes Filter > Save > Preview 

 

Create a Dropdown Post Title Filter Using Smart Filters

Dropdown Job Title Filter

 

Enjoy! 

Md Sohanur Rahman Sakib

For me, life is like a line. Line of a circle where my presence is just like a dot. A dot, which has value or maybe hasn't!

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Articles

Facebook Sound Collection: Get Copyright-Free Music

Facebook Sound Collection: Get Copyright-Free Music

If you are a content creator on Meta's platforms, this article is for you. Today, we are going to discuss Meta's feature, which is the Facebook Sound Collection. We won't face copyright-related issues by using music from here for our projects. It's free with a ton of...

read more
How to enable cGroups v2 in AlmaLinux 9

How to enable cGroups v2 in AlmaLinux 9

AlmaLinux is becoming popular day by day for the server-side OS. Besides, cGroups v2 plays a significant role in managing resources! Based on the necessity to have cGroups v2 enabled in AlmaLinux, today we will learn how to enable cGroups v2 in AlmaLinux 9. What's the...

read more

Related Articles

No Results Found

The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.

Pin It on Pinterest

Share This