Smart Filters for any WordPress list table

With Smart Filters, you can find and filter any content in the admin area of your WordPress site. These filters can simply be added to any WordPress list table for any post type without any coding required.

.

What is Smart Filtering?

Smart filtering will make your content searchable from the list table. For example, you want to show all posts that contain a certain word, or that are written after a certain date or you want to find your Scottish users by searching for last names that start with “Mc”? Smart filters can do that for you.

You can add as many filters as you like. By adding more filters you can narrow down your results even further. In this example, we will show you how to filter a list table for a custom post type:

The custom post type is called “House” and the fields (rooms, price, etc.) are added by using custom fields.

Filter Posts, Pages & Custom Post Types

Smart Filters can be applied to any of the Posts, Pages and Custom Post Types list tables. 

Filter Content

For example, the following filter loads all of the WordPress posts whose content contains “sun”, such as “sunny day” or “Sunday”:

Filter Content

Each filter has its own conditions. For the Content filter they are: contains, not contains, starts with, ends with, is set or is not set.

Filter Dates

The date filter will allow you to filter posts on an exact match or by a custom date range. For example, filter all posts published between “5 June 2019” and “26 October 2019”. You will be able to filter on publish date or last modified.

Filter Content

Available filters conditions: is, is after, is before, between, is today, is future, is past.

 

Tip Smart filters will work on any of the available post fields and custom field data.

Filter Custom Fields

The smart filters support different types of custom field data, there are several filter types available: text, number, date, file, image, link, post or user

Filter Text

This is the most powerful way of searching text-based content like names, titles, descriptions, and so on. You can either search for a part of a text using contains / not contains if you want any result where this part exists. Great when you want to retrieve all items that contain a specific word, such as “car”, which will match “cars”, “carrot” or “bankcard”.

Filter Text

Available text filters conditions are contains, does not contain, is, is not, starts with, end switch, is set or is not set.

Filter Number

Filter you custom field data by numeric values. This kind of filter works great on numeric content like a person’s age, prices or dimensions. Let’s say you have a “Real Estate” website with properties, you will now be able to filter those properties on the number of rooms, living area space or rental price.

Filter Number

You can choose the type of numeric filtering by picking one of the conditions: is, is not, is larger than, is smaller than, between, is set or is not set.

Filter Date

Custom fields containing dates can be filtered too. Available date filters conditions are is, is after, is before, between, is today, is future, is past.

Filter Date

*Custom Field date filtering only works if you have created your custom field by using ACF, Pods or Toolset Types. Read our faq for more info.

Filter Relational Data

A relational field is when you have a post or user ID stored within a custom field. For example, you have a related post “About Us” stored within a page. With our smart filter you can now find all pages that have the “About Us” post as a related post:

Filter Relational Data

The available filter conditions for a relational field are is, is not, is set or is not set.

*Relational data can only be filtered when the stored value is an ID of the post or user. 

Filter Advanced Custom Field, Pods or Toolset Types

Custom Fields that are created by using any of these external plugins are supported too. We have integration add-ons available for Advanced Custom Fields, Pods, Toolset Types, and WooCommerce.

Video demonstration

This video demonstrates smart filtering on custom field data. For this example, we are using a “Real Estate” list table that has a custom post type named “Houses”. We will filter by the number of rooms (number field), description (text field), and status (select field).

 

Tip Smart filters will work on any custom post type.

Filter Users

You can use smart filters on the Users list table that allow you to easily find your users and filter them so that you can get a precise list of the users that you need to work with. These are the available filters for the Users list stable.

Here are a few smart filter example for Users:

Filter Name

It will be easy to find users by using smart filters. You can find users based on just their full name or part of it, by using the conditional contains, ends width or starts width.

Filter Email

Find users by email using smart filters. For example, you want to find all people from a company that uses the same domain. You can simply filter users that have an email that ends with “codepress.nl”. You can also use contains to do a wider search.

These are all the available smart filters for user fields.

Save filtered segments

You can save your filters as a segment for later use. When you return to your list table at a later time you can easily select it again from the segment menu. You can save as many segments as you need and switch between them with just a click. This will save you a lot of time and allows you to create reports and multiple views of your data.

Save filtered segments

Supported list tables

Smart Filters can be added to these WordPress List tables: Posts, Pages, Custom Post Types, Taxonomies, Users, Media and Comments. Smart Each list table has its own unique available column types for smart filtering.

How to add Smart Filters to the WordPress List table

The available Smart Filters are based on the columns that are visible on the list table. You can make a Smart Filter available on the list table simply by adding the field (you want to filter) as a column to the list table. Now you can select the smart filter from the dropdown menu on the list table by clicking “Add Filter”. There is no coding required. Here is how to add a column to the list table using Admin Columns Pro. 

Benefits

Admin Columns Pro adds Smart Filters to any WordPress list table which allows you to:

  • Easily find and filter posts or users within the admin
  • Use conditional filters such as “contains”, “ends width” or “larger than”
  • Smart Filter posts, pages, custom post types, media, terms, and users
  • Find and filter any custom field data, such as text, numeric or relational data
  • Save filtered segments for later use
  • Add as many smart filters as you like to narrow down results even further
  • Add smart filters to the list table without any coding required
  • Works with 3rd party plugins, such as Advanced Custom Fields, Toolset Types, Pods and WooCommerce

Frequently Asked Questions

We can imagine you have a few questions.

  1. Which WordPress list tables are supported by Smart Filtering?
    Smart Filters can be added to these WordPress List tables: Posts, Pages, Custom Post Types, Taxonomies, Users, Media and Comments. Each list table has its own available column types for smart filtering.
  2. Can I use Smart Filtering without adding columns?
    No, you have to add the column to enable Smart Filtering. If you do not want the column visible you can hide it by disabling the column in your screen options (top right menu) on the list table.

  3. Can a column be sorted?
    Yes, most available columns can also be sorted.

  4. Can I share saved segments with other users?
    No, saved segments are unique to the user that created it, they are not shared with other users.
  5. Does it work with WooCommerce products?
    Yes, it does. Make sure to install our WooCommerce add-on. It will enable smart filters for Products and Orders.
  6. Does filtering work on a “Date” stored in a custom field?
    Only if the date custom field is created using ACF, Pods or Toolset Types. Because to filter on a date we need to know the format in which it is stored. Those plugins have a fixed date format in which they store their date data. You need to have the integration add-on for ACF, Pods or Toolset Types, installed for this to work. Note: We are currently working on making it available to all Custom Fields, so this will change in a future release.

  7. Can you filter on “Terms” stored in a custom field?
    Only if the term custom field is created using ACF, Pods or Toolset Types. Because to filter on a term we need to know the taxonomy of that term. These plugins will store the term ánd taxonomy data in a fixed format which allows us to filter its contents. You need to have the integration add-on for ACF, Pods or Toolset Types, installed for this to work.