Custom filter with custom taxonomy
-
I have a custom taxonomy
register_taxonomy('type', 'blog')where blog is a custom post type.When I use
wp_dropdown_categoriesto create a custom filter, why it is empty?add_action ( 'restrict_manage_posts', 'filters' ); function filters () { global $typenow; if ( 'blog' !== $typenow ) { return; } wp_dropdown_categories ( array ( 'show_option_all' => 'All', 'taxonomy' => get_taxonomy ( 'type' ) ) ); }When I use others like
post_tagorcategorythen it works, but it’s empty if use my custom taxonomy.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Custom filter with custom taxonomy’ is closed to new replies.