This hook is the same save_post just make sure its your post type example:
1 2 3 4 5 6 7 8 9 | function save_post_callback($post_id){ global $post; if ($post->post_type != 'MY_CUSTOM_POST_TYPE_NAME'){ return; } //if you get here then it's your post type so do your thing.. } add_action('save_post','save_post_callback'); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.