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

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

Open
drewclifton opened this issue Jun 26, 2024 · 0 comments
Open

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

drewclifton opened this issue Jun 26, 2024 · 0 comments

Comments

@drewclifton
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant