WordPress.org

Ready to get started?Download WordPress

Forums

Post Status Menu Items
[resolved] Page Status Menu Items (8 posts)

  1. Nio
    Member
    Posted 2 years ago #

    // Adds the following PAGE statuses to the "PAGES" administration submenu
    add_action('admin_menu', 'cms_page_status_menu',3);
    function cms_page_status_menu() {
    
    	global $submenu;
    	$cms_page_status_items = array(
    		array( __('Drafts'), 'read' , get_admin_url() . 'edit.php?post_status=draft&post_type=page' ),
    		array( __('Pending'), 'read' , get_admin_url() . 'edit.php?post_status=pending&post_type=page' ),
    		array( __('Scheduled'), 'read' , get_admin_url() . 'edit.php?post_status=future&post_type=page' ),
    		array( __('Published'), 'read' , get_admin_url() . 'edit.php?post_status=publish&post_type=page' )
    	);
    
    	foreach( $cms_page_status_items as $item ) {
    		array_push( $submenu['edit.php?post_type=page'], $item );
    	}
    }

    Maybe someone will add a little CSS code to help distinguish statuses by color ;)

    http://wordpress.org/extend/plugins/post-status-menu-items/

  2. mrwweb
    Member
    Plugin Author

    Posted 2 years ago #

    @nicusor, that's a great idea! That will certainly get into the next release when I have a moment. Any color preferences?

  3. mrwweb
    Member
    Plugin Author

    Posted 2 years ago #

    BTW, page statuses will be in the next version, but I lean toward disabling them by default and providing the option to enable them (with some new options added to the "Writing" settings.

    Thoughts?

  4. Nio
    Member
    Posted 2 years ago #

    Good idea to make an option to enable them, not everybody will want that for pages if they only have couple of them.

    But if I have many pages I want somehow to easily distinguish by parent/child and by statuses (I think of lite configurable colors) => /wp-admin/edit.php?post_type=page.

    This plugin has a nice Admin Collapse Subpages, but also no other way easily to distinguish the pages by status...

  5. mrwweb
    Member
    Plugin Author

    Posted 2 years ago #

    Just an FYI, in case you didn't see it. I made a big update to support all post types (including custom post types with show_ui = true).

    Hope that helps :)

  6. TheFreeWorld
    Member
    Posted 1 year ago #

    Hey does anyone know how make pages only published and draft and get rid of all the other statuses

  7. mrwweb
    Member
    Plugin Author

    Posted 1 year ago #

    Hi @TheFreeWorld.

    I went back to look at the plugin to think if there's an easy way for you to do this. The answer is not really.

    For right now, you might be able to look at the code or the snippet that inspired the plugin and write your own miniature version of the plugin only for posts.

    However, moving forward, when I next update this plugin (which isn't planned although you're giving me a good reason to consider it), I should build in some filters for people to customize the post statuses that appear in the menus.

    Hope that helps.

    p.s. This thread should have been marked "Resolved" already, but try to open up a new thread for new support issues rather than piggy-backing on a similar-but-not-the-same thread. Plugin authors will thank you :)

  8. mrwweb
    Member
    Plugin Author

    Posted 1 year ago #

    @TheFreeWorld: Make sure to check out the new version of the plugin (v1.1.0). It now includes the option to exclude any post statuses you don't want.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic