Support » Plugins » Set the location of the menu link

  • Hi guys,

    Although I’m not new to PHP I’m fairly new to wordpress programming and I must say that I’m impressed by wordpress’ capabilities!

    Anyhow, I’ve created a plugin and it works fine. The one last thing that I’m working on is setting the plugin-link at the appropriate location.

    Using the following code:

    add_menu_page(__('My test', 'mytestplugin'), __('My test', 'mytestplugin'), 'edit_pages', 'mytestplugin', 'mytestplugin');

    My plugin has become accesible in the admin menu by a completely new button, (see image, position 1), but I would like the button/link to be available at position 2. Yes, position 2 has been photoshopped into the image 😀 . Does anyone know how I can get my plugin between pages and comments, but not as a submenu of pages?



Viewing 1 replies (of 1 total)
  • Just found it out:

    add_menu_page(__('My test', 'mytestplugin'), __('My test', 'mytestplugin'), 'edit_pages', 'mytestplugin', 'mytestplugin'), NULL, 21);

    Will do the trick.

Viewing 1 replies (of 1 total)
  • The topic ‘Set the location of the menu link’ is closed to new replies.