Stand with Ukraine. Fight for freedom and democracy

Back to contents

JetEngine: Admin Filters for Custom Post Type Overview

From this tutorial, you will learn how to use JetEngine’s Admin Filters to organize Custom Post Types and what makes it so useful.

Creating Post Types enables customizing the website content not only within the existing WordPress features but also for other specific purposes. To make the workflow more convenient, use the JetEngine Admin Filters. 

Admin Filters assist in sorting the desired posts in the admin panel. They are presented in the form of select controls that can filter items by specified criteria.

Let’s review the possible settings configurations by creating different types of Admin Filters.

Navigate to JetEngine > Post Types. Create a Custom Post Type by clicking on the “Add New” button. Or, you can open the existing post by clicking on the “Edit” button next to its slug.

jetengine custom post types

Read more about creating a Post Type. After you adjust all the basic settings, proceed to the Admin Filters tab. Push the “Add New” button.

edit post type admin filters add new

Taxonomy Admin Filter

As we edit the Property Custom Post Type as an example, we may need certain filters that will help us sort the post type items. For example, the first filter may define the property type.

This filter works with taxonomies created within the Custom Post Type.

property type taxonomy admin filter
  • Title/Placeholder — a name of the filter that may also be used as a placeholder on the posts page;
  • Use Title as Placeholder — a switcher that enables the feature described above. Once toggled, the filter title will be added to the drop-down list as the first option. Otherwise, the filter will display only the options that can be found according to the following settings;
  • Type — a data source used for filtering items. Choose between two options, which are taxonomy and meta data;
  • Taxonomy — a source for posts filtering;
  • Show Hierarchy — a switcher that becomes available if the chosen taxonomy is set as hierarchical. It enables the term nesting display for hierarchical filters;
  • Show Counts — a toggle that displays the count of the posts when enabled.

Meta Data Admin Filter

Glossary options source

Check more information about Glossaries to understand better when you may need to implement customizations similar to the ones described further.

In case you have already created Glossary, you may want to use this type of Admin Filters.

The following filter’s main peculiarity is the “Filter by meta data” Type and “Glossary” Options Source.

meals meta data admin filter

Check the fields that differ from the filter where “Filter by taxonomy” is selected as the Type:

  • Meta Field — a drop-down menu that lets you choose the meta field to use as the source for filtering;
  • Custom Meta Field — a field for the meta field key that overrides the Meta Field. If the JetEngine’s meta field is selected and a custom one is entered, filtering will occur by the custom field;
  • Options Source — a drop-down list that defines the source for pulling options. Now we will set the “Glossary” option;
  • Glossary —  a list that shows available glossaries that can be picked as the filtering source.

Mind that if you are using the date timestamp field, there can be issues with its data display. Read more about the problem fixing.

Database options source

The third filter we create is also set to be the “Filter by meta data” Type. Nonetheless, in the present case, we set “Select from database” as the Options Source.

Firstly, you should add a meta field to the Custom Post Type to use this filter. Don’t forget to save the changes by hitting the “Update Post Type” button.

rooms meta field

Then fill it out while editing the post from the updated Custom Post Type. The completed information will be pulled up as the source for the filter.

rooms field in the post

This option pulls the information from the existing Post Type Meta Fields, meaning that it will be automatically found in the database.

rooms meta data admin filter

For now, we have discovered all the available filtering options. Go to the Custom Post Type you worked on and see if created filters are displayed.

CPT Filtering in Action

As you can see, all the filters should now be shown above the existing posts. Open the first drop-down menu.

When opened, you will see that the number of filtered options is displayed if you have toggled the Show Counts option while creating the Admin Filter.

property type dropdown menu

The following drop-down menu filters posts by a specific glossary.

meals dropdown menu

The last customized filter pulls its options from the database directly.

rooms dropdown menu

That’s it. Now you know how Admin Filters work. Since this moment, the customization process of JetEngine-built CPTs will become much faster.