Filter Posts by Custom Taxonomy in Admin area in WordPress

category:  WordPress

Let’s say we have a custom post type called “hotels“. We create the custom field named “country” and “rating” and add both fields into the “hotels” post type. In the Hotels page at the admin area, it shows hotel title, country, rating, author and date columns as the screenshot below. There are two hooks that involve in this solution. One is ” restrict_manage_posts” and another one is “parse_query “. The restrict_manage_posts hook will add the dropdown filter at the admin … Read More