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 have a site with eight custom post types. Each is registered with 'menu_position' => 5 (below the Post menu). A side effect of having more than four CPTs is that the Media menu now appears in the middle of the list of CPTs (see image).

Admin menu with many custom post types

My solution is to duplicate the Media menu item in a lower position, then unset the original Media menu item:

add_action( 'admin_head', 'change_menu_items' );

function change_menu_items() {

    global $menu;

    $menu[14] = $menu[10];
    unset( $menu[10] );


My question is: is this likely to cause any unforeseen side effects? I haven't come across any yet, but just wanted to make sure.


share|improve this question
I don't see any drawback. You are only changing the position of the menu. It's a link to another page. – keatch Feb 25 '11 at 23:03
up vote 7 down vote accepted

this might work:

add_filter('custom_menu_order', 'my_custom_menu_order');
add_filter('menu_order', 'my_custom_menu_order');

function my_custom_menu_order($menu_ord) {
    if (!$menu_ord) return true;
    return array(
        'index.php', // the dashboard link
        'edit.php' // posts
            // add anything else you want, just get the url
share|improve this answer
thanks, i didn't know about that filter. – Simon Blackbourn Feb 27 '11 at 12:41
Fantastic solution, and so easy! Curious, any way to control or remove the separators that Wordpress places in the menu as well? (they seem to be more obvious when the menu is collapsed) – Mr.Brown Jul 11 '12 at 2:32

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.