WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for the right hook to use for sending out an email notice when a post is inserted. However, I am using custom statuses (in this case 'holding') which doesn't seem to get hit with the new_to_holding hook, so was hoping someone knew of an alternative that gets fired when a post is inserted or perhaps a reason why that hook isn't working right.

share|improve this question
up vote 1 down vote accepted

new_to_holding doesn't exist as a post status transition - you need to use the generic transition_post_status action. Something like (untested):

add_action('transition_post_status','my_holding_function', 10, 3);

        function my_holding_function( $new_status, $old_status, $post ) {
            if ( 'holding' == $new_status ) {
                // do stuff
share|improve this answer
Thanks for the reply, I didn't get a result with the above but I am still playing with _transition_post_status – Kyle Mar 15 '13 at 14:04
Oh this did work, I was doing it wrong :) – Kyle Mar 15 '13 at 14:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.