Title: Admin Interface and Post Types
Last modified: August 19, 2016

---

# Admin Interface and Post Types

 *  [minkowski](https://wordpress.org/support/users/minkowski/)
 * (@minkowski)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/)
 * Hi,
 * I’ve been playing with the new post types in 3.0b1 and they’re truly great, really
   easy to set up and are going to make my life a lot easier. But I need help in
   trying to manipulate the admin interface.
 * If I set up two new post types I’ll get this in the admin menu …
    - Post Type One
 *  - Add New
    - Edit
 *  - Post Type Two
 *  - Add New
    - Edit
 * Which is all very well and good, but I need a little more control to produce 
   something like…
    - My Post Types
 *  - Add New Post Type One
    - Edit Post Type One
    - Add New Post Type Two
    - Edit Post Type Two
 * But I can’t seem to find any documentation on how to do this.
 * Also, if I turn the ‘show_ui’ in register_post_type to false so that I can use
   the post type without the admin menu I lose the Publish box from the Add New/
   Edit Post Type page.
 * Any help would be greatly appreciated.
 * Thanks!

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/admin-interface-and-post-types/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/admin-interface-and-post-types/page/2/?output_format=md)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1474996)
 * Moving this to Alpha/Beta forum for now.
 *  Thread Starter [minkowski](https://wordpress.org/support/users/minkowski/)
 * (@minkowski)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475203)
 * Giving this a little bump as I remember something.
 * I vaguely remember some documentation or an example of adding post types to WordPress
   earlier than 3.0 but I have had no luck finding it again.
 * I don’t remember the details of the code but it may help me solve thins problem.
   Does anyone know where that may have been?
 *  [ronbme](https://wordpress.org/support/users/ronbme/)
 * (@ronbme)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475238)
 * Are you thinking of something like the Custom Post Type UI plugin?
 *  Thread Starter [minkowski](https://wordpress.org/support/users/minkowski/)
 * (@minkowski)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475246)
 * No, I can build the post types manually, it’s just a matter of organising the
   admin interface the way I’d like it. I may download the Custom Post Type UI plugin
   and dissect it but I really need to get my head around creating an admin interface.
 *  Thread Starter [minkowski](https://wordpress.org/support/users/minkowski/)
 * (@minkowski)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475247)
 * If I use the register_post_types function a new top level menu item is built 
   for me automatically. This appears at the bottom of the top part of the menu 
   beneath Comments by default.
 * If I try to make a new top level item in the top section of the menu manually,
   all I seem to be able to do is create a subpage to an existing type.
 * add_posts_page adds a new page beneath Posts, add_pages_page add a new page beneath
   Pages, etc.
 * The problem is that I want to place a new top level menu item within this top
   part of the menu manually so I can build in all of the subpages manually.
 * The problem I’m having is simply cosmetic to the admin interface as I just want
   to reorder things, I just don’t know how.
 *  [Anointed](https://wordpress.org/support/users/anointed/)
 * (@anointed)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475268)
 * +1 searching for same answer to above questions.
 * Probably has to do with $menu global mods, but beyond that I am no help yet.
 *  [ragulka](https://wordpress.org/support/users/ragulka/)
 * (@ragulka)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475288)
 * I would also find this very useful. Another thing I’d like to see is to be able
   to group my custom post types together, to seprate them from the WordPress built-
   in content types block.
    What I mean, is in the admin menu, after Comments, there
   is a separator, and after that comes Appereance etc… I’d like to be able to create
   a separator like that.
 *  Thread Starter [minkowski](https://wordpress.org/support/users/minkowski/)
 * (@minkowski)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475334)
 * I’ve just encountered this issue again. I just ignored it last time and had a
   stack of different post types in the admin menu, but if I can get it sorted this
   time I’ll be a lot happier with the result.
 * So, anyone know?
 *  Thread Starter [minkowski](https://wordpress.org/support/users/minkowski/)
 * (@minkowski)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475335)
 * In fact, I want it to look more like this.
    - Taxonomy Name (link to wherever I like)
 *  - View/Edit Post Type A
    - Add Post Type A
    - View/Edit Post Type B
    - Add Post Type B
    - View/Edit Taxonomy
 *  [nelsonkoehn](https://wordpress.org/support/users/nelsonkoehn/)
 * (@nelsonkoehn)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475336)
 * Been looking around for something down this line myself. I see where you can 
   add a sub menu under your custom post type but I want my custom post type under
   my own main menu page.
 * Found [this](http://codex.wordpress.org/Adding_Administration_Menus) in the codex.
 * > Here’s an example of adding an option page under a custom post type menu block:
   > `<?php add_submenu_page('edit.php?post_type=wiki', 'Options', 'Options', 'manage_options','
   > wiki-options', array(&$this, 'options_page') ); ?>`
 * but that goes the opposite way I need it.
 *  Thread Starter [minkowski](https://wordpress.org/support/users/minkowski/)
 * (@minkowski)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475337)
 * I’ve written menus like that in the past, and it’s very useful, but I don’t think
   I can apply this technique to altering menus that were already created. I did
   try Adding one like this and then setting the show_ui parameter to false in the
   register_post_type function but that just removes everything and I can’t access
   the page even via a direct link.
 * What I did find was a plugin called Admin Menu Editor that will do everything
   I need, but it’s still something that I would prefer to code in myself. I reckon
   I’m going to have to take the code apart in that plugin and see how they did 
   it there.
 * Thanks for looking though!
 *  [nelsonkoehn](https://wordpress.org/support/users/nelsonkoehn/)
 * (@nelsonkoehn)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475338)
 * Read thru the [Adding_Administration_Menus](http://codex.wordpress.org/Adding_Administration_Menus)
   again and paid attention to this
 * > **function**
   >  The function that displays the page content for the menu page.
   >  Technically, as in the add_menu_page function, the function parameter is optional,
   > but if it is not supplied, then WordPress will basically assume that including
   > the PHP file will generate the administration screen, without calling a function.
   > Most plugin authors choose to put the page-generating code in a function within
   > their main plugin file.
 * Played around a little and got this to work
 *     ```
       add_object_page('My Shop', 'My Shop', 'manage_options', 'my-shop-order-log', '', MS_PLUGIN_URL . '/images/ms_icon.png');
           add_submenu_page('my-shop-order-log', 'Products', 'Products', 'manage_options', 'edit.php?post_type=ms_product');
           add_submenu_page('my-shop-order-log', 'Add New Products', 'Add New Products', 'manage_options', 'post-new.php?post_type=ms_product');
           add_submenu_page('my-shop-order-log', 'Categories', 'Categories', 'manage_options', 'edit-tags.php?taxonomy=category&post_type=ms_product');
           add_submenu_page('my-shop-order-log', 'Settings', 'Settings', 'manage_options', 'my-shop-settings', 'my_shop_setting');
       ```
   
 * Now if I can just turn of the post ui without shutting this down it will work
   fine
 * Minkowski, have you tried something down this line?
 *  [Pete Mall](https://wordpress.org/support/users/petemall/)
 * (@petemall)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475339)
 * Use `add_menu_page` to add the top level menu. Use this as an arg for `register_post_type()`:
   `
   show_in_menu => $parent` where $parent is the top level menu.
 *  [nelsonkoehn](https://wordpress.org/support/users/nelsonkoehn/)
 * (@nelsonkoehn)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475340)
 * Can’t seem to wrap my self around this one
 *     ```
       function ms_create_post_type() {
           register_post_type('ms_product', array(
          ....
           'show_ui' => true,
           'show_in_menu' => false,
          ....
           ));
       }
       ```
   
 * should take `ms-product` out of a menu, right?
    And
 *     ```
       add_action('admin_menu', 'ms_create_admin_menu');
       function ms_create_admin_menu() {
           add_menu_page('My Shop', 'My Shop', 'manage_options', 'my-shop', 'my_shop_order_log', MS_PLUGIN_URL . '/images/ms_icon.png');
       }
   
       add_action( 'init', 'ms_create_post_type' );
       function ms_create_post_type() {
           register_post_type('ms_product', array(
          ....
           'show_ui' => true,
           'show_in_menu' => 'my-shop',
          ....
           ));
       }
       ```
   
 * should put `ms-product` under my custom menu?
    Or do I not understand `$parent`?
 *  [Pete Mall](https://wordpress.org/support/users/petemall/)
 * (@petemall)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/#post-1475341)
 * Are you using the 3.1 beta?

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/admin-interface-and-post-types/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/admin-interface-and-post-types/page/2/?output_format=md)

The topic ‘Admin Interface and Post Types’ is closed to new replies.

## Tags

 * [post_type](https://wordpress.org/support/topic-tag/post_type/)

 * In: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
 * 16 replies
 * 7 participants
 * Last reply from: [nelsonkoehn](https://wordpress.org/support/users/nelsonkoehn/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/admin-interface-and-post-types/page/2/#post-1475342)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
