Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

sub menu for post type in wordpress

register_post_type( 'movies',
    array(
            'labels' => array(
                    'name' => __( 'Movies' ),
                    'singular_name' => __( 'Movie' )
            ),
    'public' => true,
    'has_archive' => true,
    'show_in_menu' => 'edit.php?post_type=entertainment'
    )
);

add_action('admin_menu', 'my_admin_menu'); 
function my_admin_menu() { 
    add_submenu_page('edit.php?post_type=entertainment', 'Genre', 'Genre', 'manage_options', 'edit-tags.php?taxonomy=genre&post_type=entertainment'); 
}
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #menu #post #type #wordpress
ADD COMMENT
Topic
Name
9+2 =