WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My theme currently has a single menu on the left hand sidebar of WP admin. I want to include submenus on that menu.

How can I add, for example, a single submenu item to the "Theme Options" menu below?

    "My Theme Options", 
    "Theme Options", 
    get_bloginfo('template_directory') .'/img/favicon.png'
share|improve this question
up vote 0 down vote accepted

To do that, you would use add_submenu_page().

But I would strongly recommend against making submenu pages for Theme options. To begin with, you should be using add_theme_page() for your Theme options page, so that your Theme options page itself is properly placed as an Appearance sub-menu page.

share|improve this answer
wrap the function add_theme_page() inside a function and hook the wrapper function to admin_menu action hook. add_action('admin_menu', 'add_theme_page_wrapper_function'); – talentedaamer Nov 23 '15 at 16:37

Use add_submenu_page()

It uses pretty much the same structure, but takes the parent-menu slug or file name as the first argument.

share|improve this answer

Your Answer


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.