WordPress.org

Support

Support » Plugins and Hacks » Hacks » [Resolved] Custom taxonomy somehow is not being added

[Resolved] Custom taxonomy somehow is not being added

  • Hi all.

    I’ve got a custom post type called “gallery” and I want to add a taxonomy called “gal_categories” to this type.

    So I do the following:

    function gallery_register() {
    
            $args = array(/*here go args*/);
    
           register_post_type( 'gallery' , $args );
    
    	register_taxonomy("gal_categories", array("gallery"),array("hierarchical" => true, "label" => "Something", "singular_label" => "Something", "rewrite" => true ));
    
    }
    
    add_action('init','gallery_register');

    Well, the custom post type works flowlessly, but I have no taxonomy I added. And that’s kind of strange…

    In fact I also have another custom post type with a taxonomy and it works just the same way: there is working post type but no taxonomy.

    What could it be?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Custom taxonomy somehow is not being added’ is closed to new replies.