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 have pages setup and want a top level menu item to direct to editing a specific page. I'm reading through add_menu_page and it doesn't list how to get to specific pages or posts edit page. ie post.php?post=FOO&action=edit.

Is this possible?

share|improve this question
up vote 1 down vote accepted

You've almost answered your own question. Just pass the URL as the $menu_slug to add_menu_page:

    null, // not an actual page, so title is irrelevant
    'Menu Item Name',
    'edit_posts', // or whatever capability required for this object

The caveat is that when you visit this menu item, the actual menu item it belongs to will be highlighted in the menu (posts, pages, media). You could fix this with a bit of JS, or just live with it.

share|improve this answer
Ahhh that was easy. But yeah I'd like not have it highlight away. Any links or snippets to take a look? – Tom Jan 9 '14 at 22:46
on second thought, I don't know that it's fixable, as it's really physically the same page, you're just navigating to it by different means. – Milo Jan 9 '14 at 22:53

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.