Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am adding administration pages using add_menu_page() function. But it wont look good. Check the image below.

alt text

I would like to have it as separated and in between Appearance and Plugins section with rounded borders.

share|improve this question
    
What image below? –  MikeSchinkel Dec 31 '10 at 9:33

1 Answer 1

up vote 3 down vote accepted

This will put one separator right after 'Appearance' and one right before 'Plugins'. Just make sure to give your menu position 62 or 63. You can just add it to whatever file is adding the admin page to begin with. This should be called after everything else has been added.

function jpb_menu_isolator(){
  global $menu;
  $menu[61] = array('', 'read', 'separator3', '', 'wp-menu-separator');
  $menu[64] = array('', 'read', 'separator3', '', 'wp-menu-separator');
  uksort($menu,'strnatcasecmp');
}

add_action( 'admin_menu', 'jpb_menu_isolator', 1000 );
share|improve this answer

Your Answer

 
discard

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.