Admin - create custom post status and display above table

How do I create a custom post status and display it above the table of my custom post type?

Example:

All(9) | Published (7) | Custom_Status(2)

I used the advance custom fields plugin to create a dropdown which represents the status of the post. But I'm sure that that does not represent the actual status of the post since it won't be saved in the post_status column in the database.

Feel free to suggest plugins. I tried the edit flow plugin, but it's kinda inconvenient because every time I change the status of my post it will un-publish the post.

Thanks!

Topic post-status admin posts customization Wordpress

Category Web


You can use the answer given here:

How to add a quicklink to the Posts Admin Published|Scheduled|Trash menu

For e.g. Stephen Harris answered the same question to add an extra menu item for displaying today's posts.

add_filter( 'views_edit-post', 'wpse_add_my_view');
function wpse_add_my_view($views){
 global $post_type_object;
 $post_type = $post_type_object->name;

 $y =mysql2date('Y', current_time('mysql') );
 $m =mysql2date('m', current_time('mysql') );
 $d =mysql2date('d', current_time('mysql') );
 $views['today'] = "<a href='edit.php?year=$y&monthnum=$m&day=$d&post_type=$post_type'>".__('Today','myplugin')."</a>";

return $views;
}

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.