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 would like to add 2 lines to the POSTS menu in the wordpress admin: Published and Scheduled. I would also like to add a section to the media menu for Unattached media. How would I go about doing this?

Cheersenter image description here

share|improve this question
Please tell us what you have tried! – Pothi Oct 8 '13 at 11:05
up vote 0 down vote accepted

You can intercept the global $submenu var and add the desired elements:

add_action('admin_menu', 'add_custom_submenus', 999);

function add_custom_submenus() {
  global $submenu;
  $submenu['edit.php'][] = array(
    __('Published'), // menu title
    'edit_posts', // menu cap
    'edit.php?post_status=publish&post_type=post' // menu link
  $submenu['edit.php'][] = array(
  $submenu['upload.php'][] = array(
share|improve this answer
That fixed it, Thanks G.M. – user39156 Oct 8 '13 at 16:52

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.