[wp-hackers] Adding post_status (to a specific post type)

Lionel POINTET lionel.pointet at globalis-ms.com
Wed Apr 4 12:47:03 UTC 2012

Hi Tom,

A post status is applicable to all types of post, regular (WP) types or
even custom types you defined.
When you *set* this status to a particular post, a new "filter" will appear
before the list of posts, near the "All" link and the other statuses.
Indeed, you defined the "show_in_admin_status_list" key to "true" but the
filtering by status is displayed only if there are already some posts with
this status.

That said, you'll need to define a new meta-box or other form stuff so that
you'll be able to set your new status to your custom status, because
WordPress doesn't display new statuses in the core drop down list.


2012/4/4 Tom Barrett <tcbarrett at gmail.com>

> I have this post status:
>  register_post_status( 'archive', array(
>    'label'                     => _x( 'Archived', 'post' ),
>    'public'                    => false,
>    'exclude_from_search'       => true,
>    'show_in_admin_all_list'    => false,
>    'show_in_admin_status_list' => true
>  ) );
> Is there any way to get the label to appear anywhere on the WordPress
> backend admin?
> The filtering works if I update the params, like so:
> wp-admin/edit.php?post_status=archive&post_type=paper
> Ideally I would restrict this to a particular post type (or set of post
> types).
> --
> http://www.tcbarrett.com | http://gplus.to/tcbarrett |
> http://twitter.com/tcbarrett
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list