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

I created an options page for admin and displayed it as a top level menu -> add_menu_page($themename, $themename, 'administrator', basename(__FILE__), 'mytheme_admin');

I want to add a sub menu under the top level menu I created to display exactly the same page (to be displayed as a sub menu but open this page also when user clicks the top level menu).

Also I don't know how to add another theme page I created under this top level menu. I have read the wordpress documentation and couldn't make it, before asking here. Many thanks.

share|improve this question

Try using add_submenu_page for adding a submenu for the extra entry. Once you add one submenu entry, by default you will have 2 subitems: the parent one (the same as the root item) and the new subitem. This is a default behavior from WordPress (replicating the parent element as the first row when you have other subpages).

share|improve this answer
Thanks Mario! Could you show me what to do in my case please? I am confused! – Arg Geo Jun 14 '12 at 19:02
Checkout the add_admin function in one of my plugins - plugins.trac.wordpress.org/browser/offer-calc/trunk/… – Mario Peshev Jun 15 '12 at 6:30

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.