Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant