imath / wp-statuses

WordPress plugin to ease Custom Post Statuses integration
GNU General Public License v2.0
160 stars 27 forks source link

Possible to show custom status on the All Posts page? #93

Open drewclifton opened 2 months ago

drewclifton commented 2 months ago

Hi! Is there any way to get the status to show in on the All Posts page, i.e.:

Screenshot 2024-06-25 at 9 20 33 PM

Here is my current code for reference:

// Register custom post status for expired events (helped by WP Statuses plugin)
function ewr_register_custom_post_status() {
    register_post_status('expired', array(
        'label'                     => _x('Expired', 'post'),
        'public'                    => true,
        'internal'                  => false,
        'exclude_from_search'       => true,
        'show_in_admin_all_list'    => true,
        'show_in_admin_status_list' => true,
        'label_count'               => _n_noop('Expired <span class="count">(%s)</span>', 'Expired <span class="count">(%s)</span>'),

        /* WP Statuses specific arguments. */
        'post_type'                   => array( 'event' ), // Only for events!
        'show_in_metabox_dropdown'    => true,
        'show_in_inline_dropdown'     => true,
        'show_in_press_this_dropdown' => true,
        'labels'                      => array(
            'metabox_dropdown' => __( 'Expired', 'wp-statuses' ),
            'inline_dropdown'  => __( 'Expired', 'wp-statuses' ),
        ),
        'dashicon'                    => 'dashicons-calendar-alt', // Icon for Expired status
    ));
}
add_action('init', 'ewr_register_custom_post_status');

Thanks very much.