Quantcast
Channel: Is there a save_post hook for custom post types? - WordPress Development Stack Exchange
Browsing all 4 articles
Browse latest View live

Answer by میلادشرفی for Is there a save_post hook for custom post types?

call function my_func() whene publish(save) special post typeadd_action('save_post_[name_of_post_type]', ' my_func');call function my_func() whene publish(save) all post type (post, page, product,...

View Article



Answer by Manny Fleurmond for Is there a save_post hook for custom post types?

New solution, as of WP 3.7: save_post_{$post_type}add_action( 'save_post_my_post_type', 'wpse63478_save' );function wpse63478_save() { //save stuff}See the note on the codex page

View Article

Answer by Bainternet for Is there a save_post hook for custom post types?

the hook is the same save_post just make sure its your post type ex:add_action('save_post','save_post_callback');function save_post_callback($post_id){ global $post; if ($post->post_type !=...

View Article

Is there a save_post hook for custom post types?

Is there a save_post hook for custom post types?Example: save_my_post_typeI know there is publish_my_post_type but I'm looking for a save hook.

View Article
Browsing all 4 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>