wp_update_post on specific custom post type

You can stop executing the function if the post is not of a specific post type. You can use get_post_type() for this.

if( 'masters' != get_post_type( $post_id ) )
  return;

Leave a Comment