title: Custom Post Type Submenu
body: <p>Is there a way of adding a sub menu on and admin menu (plugin) and this particular menu is a custom post type?</p>
  
  <p>Here's the code:</p>
  
  <pre><code>// The Main Menu
  add_action( 'admin_menu', 'create_main_menu' );
  function create_main_menu(){
      add_menu_page( 
          'Menu Title', 
          'Menu Name', 
          'manage_options', 
          'menuslughere', 
          'display_custom_page' 
      ); 
  }
  function display_custom_page(){ 
      include 'sample_page.php'; 
  }
  
  // The Submenu
  add_action( 'init', 'create_my_custom_post_type' );
  function create_my_custom_post_type() {
      register_post_type( 'post_type_name',
          array(
              'labels' =&gt; array(
                  'name' =&gt; 'Sample',
              'menu_name' =&gt; 'Sample',
                  'singular_name' =&gt; 'Sample',
                  'add_new' =&gt; 'Sample',
                  'add_new_item' =&gt; 'Sample',
                  'edit' =&gt; 'Edit',
                  'edit_item' =&gt; 'Edit Sample',
                  'new_item' =&gt; 'New Sample',
                  'view' =&gt; 'View',
                  'view_item' =&gt; 'View Sample',
                  'search_items' =&gt; 'Search Sample',
                  'not_found' =&gt; 'No Sample found',
                  'not_found_in_trash' =&gt; 'No Sample found in Trash',
                  'parent' =&gt; 'sample_parent'
              ),             
              'show_ui' =&gt; true,
              'show_in_menu' =&gt; 'admin.php?page=menuslughere',
              'public' =&gt; true,
              'supports' =&gt; array( 'title', 'editor' ),
              'taxonomies' =&gt; array( '' ),
              'has_archive' =&gt; true
          )
      );
  }
  </code></pre>
  
  <p>If you'll check the code, the registering of post type part... I have supplied the show_in_menu with "admin.php?page=menuslughere" but it seems it is not working.</p>
  
  <p>Any thoughts will be greatly appreciated.</p>