customization - Admin - create custom post status and display above table

admin2025-01-07  4

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!

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!

Share Improve this question asked Dec 20, 2013 at 1:52 user2772219user2772219 117 bronze badges 1
  • there is already a answer for this question on stackexchange – Kumar Commented Dec 20, 2013 at 6:47
Add a comment  | 

1 Answer 1

Reset to default 0

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;
}
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736258998a556.html

最新回复(0)