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've set up some admin pages using add_sub_menu() and whenever I add an additional querystring variable beyond the "page=" portion of the URL, I get a "Cannot load 'page-slug'." message. When I remove the every variable the page loads correctly. Here is my add menu code:

  __( 'Post Types - Add', 'plugin-slug' ),

If I browse to:


it works fine. But browsing to:



Cannot load content-toolkit-posttypes-add.

share|improve this question
up vote 0 down vote accepted

You're recieving this error because WordPress notices the post_type query argument and that sampletype is a valid registered post type, and thinks you're on an edit page. Try using a different query arg then post_type.

Note that admin.php?page=plugin-slug-posttypes-add&post_type=thisisnotaposttype and admin.php?page=plugin-slug-posttypes-add&foo=bar will both work fine.

share|improve this answer
I didn't realize using that specific variable name would affect it. Thanks! – hereswhatidid Jun 15 '13 at 14:10

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.