Skip to content
This repository was archived by the owner on Nov 17, 2024. It is now read-only.
This repository was archived by the owner on Nov 17, 2024. It is now read-only.

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

@drewclifton

Description

@drewclifton

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions