WordPress.org

Forums

Custom post_status in 3.0 (3 posts)

  1. Michael Fields
    Themer
    Posted 4 years ago #

    Was digging through WordPress core when I stumbled upon a nifty little function called register_post_status(). I got really excited because use of this function would allow another level of control to custom post_types. For instance - I would like to create "Available", "Sold", "Not for Sale", etc for a custom post_type. This would allow me to easily use WordPress Api for querying posts with certain status.

    In my mind "Available", "Sold", "Not for Sale" would all be aliases for "Published" but they would offer a certain semantic value that "Published" does not deliver alone.

    I've been able to register a custom status successfully, I can then directly change the value of a post to this status in the database. When I view multiple posts in the admin the option will appear at the top of the page and I can successfully sort my post by the custom status. However if I edit the piece (quick edit or "time-consuming" edit), my custom status is no where to be found. If I save the post, the value will be set to whatever WordPress chooses by default.

    So my question are:

    1. Has anyone hacked around with this new function?
    2. Is it even possible to take full advantage with on both live and admin pages?
    3. Have you heard anything about when full support might be added to core?

    Thanks!
    -Mike

  2. TheDailyCrowdsource
    Member
    Posted 4 years ago #

    I'm not sure if you've found your answer. This may help:
    http://core.trac.wordpress.org/ticket/12567

    You can also check out the code of the plugin "Edit Flow."

    I'm on a deep quest to solve the problem of custom post statuses.

    I'm trying to allow authors to save posts as "editing", editors to save as "publishing" ....
    Would you mind sharing what you did to get it to show up, or if you've solved it?

    Thanks Mike. Hope I helped at least a little,
    -David

  3. Michael Fields
    Themer
    Posted 4 years ago #

    TheDailyCrowdsource,
    Thanks for writing. I have abandoned this for the time being... at least until it is better supported in core. I had a chat with Andrew Nacin on Twitter where he compared support for custom post_statuses in 3.0 to that of custom post_types in 2.9. They are there and you can register them, but there's not much else you can easily do with them yet. Although I'm really excited to use custom post statuses... I'll just have to wait. Sorry I can't be of more help to you.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.