miriamdepaula

WordPress: Custom Menu Order

Dec 26th, 2011
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. // CUSTOMIZE ADMIN MENU ORDER
  2.    function custom_menu_order($menu_ord) {
  3.        if (!$menu_ord) return true;
  4.        return array(
  5.         'index.php', // this represents the dashboard link
  6.         'edit.php?post_type=events', // this is a custom post type menu
  7.         'edit.php?post_type=news',
  8.         'edit.php?post_type=articles',
  9.         'edit.php?post_type=faqs',
  10.         'edit.php?post_type=mentors',
  11.         'edit.php?post_type=testimonials',
  12.         'edit.php?post_type=services',
  13.         'edit.php?post_type=page', // this is the default page menu
  14.         'edit.php', // this is the default POST admin menu
  15.     );
  16.    }
  17.    add_filter('custom_menu_order', 'custom_menu_order');
  18.    add_filter('menu_order', 'custom_menu_order');
  19.  
  20.     //-----------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment