WordPress.org

Ready to get started?Download WordPress

Forums

register_taxonomies and standard post types (3 posts)

  1. Mark Rowatt Anderson
    Member
    Posted 3 years ago #

    I am trying to add some taxonomies. Everything works as expected with my own custom post types, but it is not working as I expect (or hope!) with standard post types.

    (1) I can add a new taxonomy to pages, and the taxonomy shows up fine when I create/edit a post. However, I do not get a link to edit that taxonomy's terms in the 'Page' section of the admin menu - i.e. a link to wp-admin/edit-tags.php?taxonomy=my_new_taxonomy. If I attach the taxonomy to both pages and posts, the edit menu is added as expected to the 'Posts' section, but it never gets added to 'Pages'. Is this a bug, or am I missing something? I am adding the taxonomy using:-

    register_taxonomy('my_new_taxonomy',array('page','post'),array(
        'hierarchical' 	=> TRUE,
        'label' 		=> 'New Taxonomy',
        'singular_label'	=> 'New Taxonomy',
        'public' 		=> TRUE,
        'show_ui' 		=> TRUE,
        'rewrite' 		=> FALSE
      ));

    (2) I would like to add a category taxonomy to images, and a hierarchical category taxonomy to links. Is this possible? Using the above code but with post types 'link' and 'attachment' doesn't add anything in the admin interface for links/media.

    Thanks,

    mark.

  2. Mark Rowatt Anderson
    Member
    Posted 3 years ago #

    Digging in the source, it seems that the code for (1) is missing, so I submitted a bug and possible fix - bug #13560.

    That code is also missing for the menus for media and links. It would be easy enough to add, but unlike pages, the custom taxonomy doesn't appear at all in the create/edit link/media pages.

    Is there some other (straightforward) way to add custom taxonomies for links/media or is that functionality just not implemented right now?

  3. MichaelH
    Member
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic