Forums

[resolved] Why Won't Categories & Post Tags Work (1 post)

  1. Martin
    Member
    Posted 1 year ago #

    I've got the following code to set up a new custom post type called fabrics, but the categories and post tags are not showing up on the Add New page or within the newly created drop down menu.

    Here's my code;

    register_post_type('fabrics',
    array('label' => 'Fabrics',
    'show_ui' => true,
    'show_in_menu' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'supports' => array('title','editor','excerpt','custom-fields','revisions','thumbnail',),
    'taxonomies' => array('category', 'post_tag'),
    'labels' => array (
      'name' => 'Fabrics',
      'singular_name' => 'Fabric',
      'menu_name' => 'Fabric',
      'add_new' => 'Add New',
      'add_new_item' => 'Add New Fabric',
      'edit' => 'Edit',
      'edit_item' => 'Edit Fabric',
      'new_item' => 'New Fabric',
      'view' => 'View Fabric',
      'view_item' => 'View Fabric',
      'search_items' => 'Search Fabrics',
      'not_found' => 'No Fabrics Found',
      'not_found_in_trash' => 'No Fabrics found in trash',
      'parent' => 'Parent Fabric',
    )
    ));

    Can anyone see anything wrong with this?

Topic Closed

This topic has been closed to new replies.

About this Topic