Custom taxonomy problem
-
Hello,
I use the code below to add custom (advert type) taxonomy but when users submit an ad new advert type taxonomies are automatically created in the form of numbers, see image below
this is the code im using for the advert type taxonomy
/* ------------------------------------------------------------------------- * * Add new ADVERT TYPE taxonomy to WP Adverts /* ------------------------------------------------------------------------- */ add_action( "init", function() { // Register new taxonomy and assign it to WPAdverts $args = array( 'label' => "Advert Type", 'hierarchical' => false, 'query_var' => true, 'meta_box_cb' => false, 'rewrite' => array('hierarchical' => true, 'slug' => 'advert-type' ) ); register_taxonomy( 'advert_type', 'advert', $args ); register_taxonomy( 'tags', 'advert' ); }); add_action( "admin_init", function() { // hide custom taxonomies in the sidebar // Custom Fields editor will handle them remove_meta_box( 'tagsdiv-tags', 'advert', 'side' ); } );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom taxonomy problem’ is closed to new replies.