I am creating a catalog theme for my client, and I like to add an expiration function in messages, changing the status of a message from a publication before the expired date.
To achieve this, I am trying to register a new message status using the following code:
add_action('init', 'registerStatus', 0); function registerStatus() { $args = array( 'label' => _x('Expired', 'Status General Name', 'z' ), 'label_count' => _n_noop('Expired (%s)', 'Expired (%s)', 'z'), 'public' => true, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'exclude_from_search' => true ); register_post_status('expired', $args); }
The problem is that I cannot see the registered status of the message either in WordPress posts or in my custom post post post types.
Am I doing something wrong?
source share