i have register 2 custom post types within my plugin one of them is shown in the left admin bar, the second i wouldn't show so i have set the "show_ui" to false.
Is it possible to add the second post type to the menu of the first post type?
first post type:
$args = array(
'labels' => $labels,
'public' => true,
'has_archive' => false,
'menu_position' => 100,
'supports' => array( 'title', 'editor', 'custom-fields', 'thumbnail' ),
'menu_icon' => plugins_url( 'assets/img/small1.png', __FILE__ ),
'rewrite' => array('slug' => 'screenshots', 'with_front' => true)
);
register_post_type( 'screenshots', $args );
second post type:
$args = array(
'show_ui' => false,
'labels' => $labels,
'public' => true,
'has_archive' => false,
//'menu_position' => 100,
'supports' => array( 'title', 'editor', 'custom-fields', 'thumbnail' ),
//'menu_icon' => plugins_url( 'assets/img/small2.png', __FILE__ ),
'rewrite' => array('slug' => 'deal', 'with_front' => true)
);
register_post_type( 'deals', $args );
I try to add the second post type with:
add_submenu_page( 'edit.php?post_type=deals', __('Deal', $this->var_sTextdomain), __('Deal', $this->var_sTextdomain), 'manage_options', 'my-deal', array(&$this, 'deal_page') );
What can i do to add it to the first post type at the end?
regards