WpCode.net

Daily Wordpress Code Snippet

How to display Custom Post Type as Submenu

| 0 comments

Pin It

In this great snipped Kevin Chard from Wpsnipp.com show how to display the custom post type “Add new Post” as submenu.

You just need to add the following codes to your theme’s function.php. Continue reading

function nacin_register_slideshows_post_type() {
	register_post_type( 'slideshow', array(
		'labels' => array(
			'name' => 'Slideshows',
			'singular_name' => 'Slideshow',
		),
		'public' => true,
		'show_ui' => true,
		'show_in_menu' => 'edit.php',
		'supports' => array( 'title' ,'thumbnail', 'editor' ),
	) );
}
add_action( 'init', 'nacin_register_slideshows_post_type' );

Leave a Reply

Required fields are marked *.

*