• how can i add a taxonomy page to a admin menu?

    I am able to move the custom post type into a submenu ok but can’t seem to add the taxonomy.

Viewing 2 replies - 1 through 2 (of 2 total)
  • sprytechies_kedar_jangir

    (@sprytechies_kedar_jangir)

    use this in functions.php file

    register_post_type(‘discography’,
    array(
    ‘labels’ => array(
    //your label stuff
    ),

    ‘taxonomies’ => array(‘category’), <========= add this….

    ‘public’ => true,
    ‘show_ui’ => true,
    ‘exclude_from_search’ => true,
    ‘hierarchical’ => true,
    ‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’ ),
    ‘query_var’ => true
    )
    );

    Thread Starter everyeurocounts

    (@everyeurocounts)

    hi mate thanks for the reply but i’m not sure if im applying this right, you add ‘taxonomies’ => category or the taxonomy name ?

    i did this but no result, the taxonomies dont appear in the menu selected. see below for code:

    $args = array_merge(
                      // Default
                      array(
                      'label' => $plural,
                      'labels' => $labels,
                      'taxonomies' => array('category'),
                      'public' => true,
                      'exclude_from_search' => true,
                      'query_var' => true,
                      'show_ui' => true,
                      'supports' => array('title', 'editor'),
                      'show_in_menu' => 'marketdisplayoptions',
                      'show_in_nav_menus' => true,
                      '_builtin' => false,
                      ),
                      // Given args
                      $this->post_type_args
              );
    
              // Register the post type
              register_post_type($this->post_type_name, $args);
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Admin submenus add taxonomy page’ is closed to new replies.