0

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!

  • there is already a answer for this question on stackexchange – Kumar Dec 20 '13 at 6:47
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;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.