WordPress.org

Ready to get started?Download WordPress

Forums

Can't add custom post status with register_post_status (3 posts)

  1. szaqal21
    Member
    Posted 2 years ago #

    hi I've got a problem with adding custom post status. I've put this code in functions.php:

    function add_custom_status()
    {
    	register_post_status( 'publish', array(    'label' => _x('Custom status label', 'post'),
                                                'public' => true,
                                               '_builtin' => true,
                                                'label_count' => _n_noop('Custom status label <span class="count">(%s)</span>', 'Custom status label <span class="count">(%s)</span>')
                                            ) );
    }
    
    add_action('init', add_custom_status);

    but custom status doesn't show in post status dropdown. Am I doing something wrong?

  2. Andrew Tegenkamp
    Member
    Posted 2 years ago #

    A month later but I was doing the same and found that new post status' are not yet built into the admin it seems. There is at least one workaround plugin at http://editflow.org that seems interesting.

    Also, I noticed on your code that builtin is true. That probably should be false since it's not builtin but it won't help get things going like you (and I) were initially hoping when finding this function in the codex.

  3. szaqal21
    Member
    Posted 2 years ago #

    Thanks for reply, I've abandon this aproach.

Topic Closed

This topic has been closed to new replies.

About this Topic