How can I rearrange items on the dashboard navigation?

17 views
Skip to first unread message

Charlie Chauvin

unread,
May 12, 2011, 7:25:46 PM5/12/11
to wordpres...@googlegroups.com
I just added a custom post type but on the dashboard it comes up at the bottom of the left navigation on the dashboard. Is there a way through the functions to push it further up on the list. For that matter is there a way I can rearrange them all to my liking so that I can streamline my clients thought process navigating the back-end. Thank you very much!

--
CHARLIE CHAUVIN
That's my name, don't wear it out.
http://www.chawlie.com
512-589-0996


Paul

unread,
May 12, 2011, 7:28:34 PM5/12/11
to wordpres...@googlegroups.com
Via the register_post_type parameters there is a 'menu_position' option to control where in the left nav the post type menu appears. 

As far control of the WP default items Im sure these is a plugin that can hook into this. 

P-


--
You received this message because you are subscribed to the Google Groups "WordPress Austin" group.
To post to this group, send email to wordpres...@googlegroups.com
To unsubscribe from this group, send email to wordpress-aust...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/wordpress-austin?hl=en
 
Our meeting information is available at http://www.meetup.com/austinwordpress/

Bill Erickson

unread,
May 12, 2011, 7:34:35 PM5/12/11
to wordpres...@googlegroups.com

Take a look at the twentyten crm theme to see how we did it (if I wasn't on my phone id post the actual code ).

Http://www.billerickson.net/twentyten-crm

Charlie Chauvin

unread,
May 13, 2011, 11:48:03 AM5/13/11
to wordpres...@googlegroups.com
Thanks for the replies. I looked at both and while it's not an exact science, something like 'menu_position' => 05, gets me where I need to be. I wish I could specify an order, but from what I could tell it just moves it below something existing. For example my post types are Posts and Bios. I can move Bios below Post, but not above it. This works better for me though.

Bill, thanks for the working example. Looks like a useful theme. I've been hacking my way through your Custom Meta Boxes so this is helpful to see what I could be doing better.

Thanks

Bill Erickson

unread,
May 13, 2011, 11:55:28 AM5/13/11
to wordpres...@googlegroups.com
In the theme I linked to you can use this function to reorder those however you want. If you wanted bios before posts you could do this:

// Customize Admin Menu Order
add_filter( 'custom_menu_order', 'crm_custom_menu_order' );
add_filter( 'menu_order', 'crm_custom_menu_order' );
function crm_custom_menu_order( $menu_ord ) {
if ( !$menu_ord ) return true;
return array(
'index.php', // this represents the dashboard link
'edit.php?post_type=bios', //the bios tab
'edit.php', //the posts tab
'upload.php', // the media manager
'edit.php?post_type=page', //the posts tab
    );
}


I


---
Bill Erickson
WordPress Consultant
http://www.billerickson.net


--

Charlie Chauvin

unread,
May 13, 2011, 1:10:16 PM5/13/11
to wordpres...@googlegroups.com
Bill,
This is awesome! I see all the extras in your theme now. Just need to make sense of them, but it's working now.

Thanks again!
Reply all
Reply to author
Forward
0 new messages