WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just figured out the menu_position parameter it seems like you can place the menu of your custom post type almost everywhere. Except above the Posts menu!

How can I accomplish that?

share|improve this question
Good question, it seems that is the one place it won't go. – jnthnclrk Aug 29 '13 at 12:44

The new JetPack Plugin places its menu link immediately below the Dashboard link. It does so by setting its menu order to 0, by filtering the $menu_order array:

function jetpack_menu_order( $menu_order ) {
        $jp_menu_order = array();

        foreach ( $menu_order as $index => $item ) {
            if ( $item != 'jetpack' )
                $jp_menu_order[] = $item;

            if ( $index == 0 )
                $jp_menu_order[] = 'jetpack';

        return $jp_menu_order;

Out of curiosity, what would happen if you tried 0 as menu_position?

share|improve this answer

Positions for Core Menu Items

  • 2 Dashboard
  • 4 Separator
  • 5 Posts
  • 10 Media
  • 15 Links
  • 20 Pages
  • 59 Separator
  • 60 Appearance
  • 65 Plugins
  • 70 Users
  • 75 Tools
  • 80 Settings
  • 99 Separator

Parameter description for "menu position"

$position (integer) (optional) The position in the menu order this menu should appear. By default, if this parameter is omitted, the menu will appear at the bottom of the menu structure. The higher the number, the lower its position in the menu.

WARNING: if two menu items use the same position attribute, one of the items may be overwritten so that only one item displays! Risk of conflict can be reduced by using decimal instead of integer values, e.g. 63.3 instead of 63.

Default: bottom of menu structure

share|improve this answer

This is a bug in WordPress. Please see this thread in Trac: http://core.trac.wordpress.org/ticket/14755

share|improve this answer

I've used 'menu_postion' => 0, 1,2,3,4.

Doesn't matter really. If you play around with it you can easily figure it out.

Using 'menu_position' => 1 should place it below the Dashboard menu item above the separator thing. 0 Should place it above the Dashboard

share|improve this answer

You can use this:

function my_move_post () {
    global $menu;
    $menu[6] = $menu[5]; //move post from post 5 to 6
    unset($menu[5]); //free the position 5 so you can use it!
add_action('admin_menu', 'my_move_post');

Now you can use position 5 to add you menu above Post menu.

share|improve this answer
This did not work for me. I placed it within my sitewide plugin where my custom-post-type.php file is – Daniel Aug 14 '14 at 16:19

On the same link you linked, it reads:

(integer) (optional) The position in the menu order the post type should appear.
Default: null - defaults to below Comments
5 - below Posts
10 - below Media
20 - below Pages
60 - below first separator
100 - below second separator

So, if you set menu_position to something like 4, then it should put it above posts.

A position of -1 puts it above the Dashboard link.

share|improve this answer
I tried 4 but it exactly the same as 5. – janoChen Feb 7 '11 at 19:23
Hrm. Tried 1-3? I think perhaps "1" (or "0") is the Dashboard. Perhaps something 2-3 would work – Zack Feb 7 '11 at 20:32
0 1 2 3 Goes before the Dashboard and 4 Goes below Posts. Is really impossible! – janoChen Feb 8 '11 at 5:44
Wow. broken much WordPress? I don't know then. :-/ – Zack Feb 8 '11 at 5:52
I think that 4 is the separator right above Posts, and 5 is Posts, so if you set your menu-position to 3 it will be right before the separator. With default configuration of course. Setting my plugin page to 4 overwrote the separator, but did appear just above Posts. hmmm... – goldenapples Mar 28 '11 at 19:50

You can use decimal values (as strings). For example, I have some custom post types that I placed at the last position in menu (100001, 100002, 100003).

Then, just put this code to move them above Posts and below Dashboard menu items.

function reorder_admin_menu() {

  global $menu;

  // Add one separator

  $menu["3.1"] = array(
    0 =>  '',
    1 =>  'read',
    2 =>  'separator_' . "anything_unique",
    3 =>  '',
    4 =>  'wp-menu-separator'

  // I have put my menu items waay at the end (exactly these values), so move them up

  $menu["3.2"] = $menu[100001];
  $menu["3.3"] = $menu[100002];
  $menu["3.4"] = $menu[100003];


  // move Media menu (position 10) item to front, in the same group
  $menu["3.5"] = $menu[10];

  // Debug: ksort($menu); error_log( var_export( $menu, true ) );

add_action( 'admin_menu', 'reorder_admin_menu', 999 );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.