Your cart is currently empty!
Plugin fields don’t appear on custom taxonomy
—
by
I’ve created a couple of custom taxonomies using the standard WordPress method:
add_action( 'init', 'register_taxonomy_verticals' );
function register_taxonomy_verticals() {
$labels = array(
'name' => _x( 'Verticals', 'verticals' ),
'singular_name' => _x( 'Vertical', 'vertical' ),
'search_items' => _x( 'Search Verticals', 'verticals' ),
'popular_items' => _x( 'Popular Verticals', 'verticals' ),
'all_items' => _x( 'All Verticals', 'verticals' ),
'parent_item' => _x( 'Parent Verticals', 'verticals' ),
'parent_item_colon' => _x( 'Parent Verticals:', 'verticals' ),
'edit_item' => _x( 'Edit Verticals', 'verticals' ),
'update_item' => _x( 'Update Verticals', 'verticals' ),
'add_new_item' => _x( 'Add New Verticals', 'verticals' ),
'new_item_name' => _x( 'New Verticals', 'verticals' ),
'separate_items_with_commas' => _x( 'Separate verticals with commas', 'verticals' ),
'add_or_remove_items' => _x( 'Add or remove Verticals', 'verticals' ),
'choose_from_most_used' => _x( 'Choose from most used Verticals', 'verticals' ),
'menu_name' => _x( 'Verticals', 'verticals' ),
);
$args = array(
'labels' => $labels,
'public' => true,
'show_in_nav_menus' => true,
'show_ui' => true,
'show_tagcloud' => true,
'show_admin_column' => false,
'hierarchical' => false,
'rewrite' => true,
'query_var' => true
);
register_taxonomy( 'verticals', array('post'), $args );
}
However, the restrict categories fields don’t appear when I edit the items in this taxonomy. They DO appear in the built-in taxonomies of Categories and Tags. The “Verticals” taxonomy appears in the plugin settings and is checked. I’ve tried unchecking and rechecking the taxonony and the options still don’t appear. Any ideas?
Comments
3 responses to “Plugin fields don’t appear on custom taxonomy”
That worked, thanks!
Perfect 🙂
Hi Ken,
Please try to register your taxonomy with an earlier priority, that would be:
add_action( 'init', 'register_taxonomy_verticals', 9 );
I’ve tested it with the definition you have provided and it works for me, please let me know if you need further help on that after trying it out.