[resolved] Custom menu group for admin - question (3 posts)

  1. Gregg Banse
    Posted 2 years ago #

    I'm building a plugin for tools we use within our University.

    I have a top level admin menu item in place.

    I have successfully added sub-menu items under Settings but want to move them to my new top level menu item.

    All functions are in one file at this point.

    I'm not sure how to move the sub-menu items to my top level menu. Do I need to separate those functions out into their own file?

  2. Gregg Banse
    Posted 2 years ago #

  3. Gregg Banse
    Posted 2 years ago #

    Ah - figured it out. Examples are a bit misleading but the best way to understand how to do this is:

    1. Create a function that contains the menu-building code
    2. Register the above function using the admin_menu action hook. (If you are adding an admin menu for the Network, use network_admin_menu instead).
    3. Create the HTML output for the page (screen) displayed when the menu item is clicked


Topic Closed

This topic has been closed to new replies.

About this Topic