WordPress.org

Forums

Set the location of the menu link (2 posts)

  1. michielh
    Member
    Posted 4 years ago #

    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 :D . Does anyone know how I can get my plugin between pages and comments, but not as a submenu of pages?

    Thanks!

    Michiel

  2. michielh
    Member
    Posted 4 years ago #

    Just found it out:

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

    Will do the trick.

Topic Closed

This topic has been closed to new replies.

About this Topic