Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am developing one of my first plugins, and have come across a error:

You do not have sufficient permissions to access this page

The plugin has a wizard that uses several forms, obviously I don't want people selecting later forms using the menu.

Is there a way to "silently" register a page? Basically, register the page without having it appear in any menu.

(I don't like my work around)

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

The mighty Codex holds the answers:

  1. If you're running into the »You do not have sufficient permissions to access this page.« message in a wp_die() screen, then you've hooked too early. The hook you should use is admin_menu.

  2. $parent_slug: Use NULL or set to options.php if you want to create a page that doesn't appear in any menu

share|improve this answer
    
I am rolling my eyes and laughing at myself. I wouldn't have thought to look on the "add_submenu_page" to figure out how not add a submenu page. Question answered... thanks. –  Kavius Jan 15 '13 at 22:23
1  
You can also register a page as normal and remove it using remove_menu_page(). The page will still be accessible by URL, but will not show up in the menu –  bungeshea Jan 15 '13 at 22:54
    
Hmm... I think this may be the question I was really asking [link]wordpress.stackexchange.com/questions/7812/… –  Kavius Jan 16 '13 at 0:05
add comment

Your Answer

 
discard

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.