Filters post in admin with dropdown select, custom post type
I’m trying to filter my post in my admin area with a custom filter dropdown. I use this method to make it: https://wordpress.stackexchange.com/a/45447/84541 Here is my code: add_action( ‘restrict_manage_posts’, ‘wpse45436_admin_posts_filter_restrict_manage_posts’ ); function wpse45436_admin_posts_filter_restrict_manage_posts(){ $type=”post”; if (isset($_GET[‘post_type’])) { $type = $_GET[‘post_type’]; } //only add filter to post type you want if (‘post’ == $type){ //change this … Read more