Skip to content

Instantly share code, notes, and snippets.

@cristianraiber
Created May 11, 2016 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cristianraiber/4480ab0208999c820b3e468e2c0b28c6 to your computer and use it in GitHub Desktop.
Save cristianraiber/4480ab0208999c820b3e468e2c0b28c6 to your computer and use it in GitHub Desktop.
CUSTOMIZE ADMIN MENU ORDER
// CUSTOMIZE ADMIN MENU ORDER
function custom_menu_order($menu_ord) {
if (!$menu_ord) return true;
return array(
'index.php', // this represents the dashboard link
'edit.php?post_type=events', // this is a custom post type menu
'edit.php?post_type=news',
'edit.php?post_type=articles',
'edit.php?post_type=faqs',
'edit.php?post_type=mentors',
'edit.php?post_type=testimonials',
'edit.php?post_type=services',
'edit.php?post_type=page', // this is the default page menu
'edit.php', // this is the default POST admin menu
);
}
add_filter('custom_menu_order', 'custom_menu_order');
add_filter('menu_order', 'custom_menu_order');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment