register_post_status and show_in_admin_all_list

This solves my problem:

register_post_status('my_custom_post_status', array(
    'label' => __('The Label', 'domain'),
    'public' => !is_admin(),
    'exclude_from_search' => true,
    'show_in_admin_all_list' => false,
    'label_count' => //blablabla
));

!is_admin() makes the status only public on the frontpage.

If you find a better solution please post it here!

Leave a Comment