New post status for custom post type
I have a custom post type recipes
. I am using a cron script to automatically aggregate news into the database.
It is currently being imported and saved as 'Pending Review'. Is it possible to create another post status called Aggregated
which will list all of the aggregated news to be published?
I tried using the register_post_status
function, however this didn't seem to work:
function custom_post_status(){
register_post_status( 'aggregated', array(
'label' = _x( 'Aggregated', 'recipes' ),
'public' = false,
'exclude_from_search' = true,
'show_in_admin_all_list' = true,
'show_in_admin_status_list' = true,
'label_count' = _n_noop( 'Aggregated span class="count"(%s)/span', 'Aggregated span class="count"(%s)/span' ),
) );
}
add_action( 'init', 'custom_post_status' );
Thanks for help with this.
Topic post-status custom-post-types Wordpress
Category Web