By default, WordPress allows you to filter posts and pages by a couple of different parameters: namely, by publication and by category. Let’s say though that you’ve added a new meta field to your post or you’ve even created a whole new post type with all kinds of new meta fields. It would be nice to be able to filter your post type by one or more of those meta fields. What is a meta field? Yes, good question. A meta field is a piece of custom data in addition to the main post content. For example, you’ve got a custom post type called ‘Book’ and you’ve created a meta field called ‘Genre’ where you can define each book’s genre. I am assuming that you already know how to add meta boxes and meta fields to your content. If not, there’s some more information at and you don’t have to look very far for a number of different libraries and tools that will allow you to create the necessary code quickly and easily. In my Wisdom plugin, I use a lot of different meta fields to store data about tracked websites. Wisdom is a plugin for plugin developers – you
Share This

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.