publish – add_action ‘wp_after_insert_post’ for custom post types

Question

I’m using Advanced Custom Fields and I would like a function to run when I either publish or update a custom post type. I’ve tried acf/save, add_action( 'wp_after_insert_post' and add_action( 'save_post_my_post_type' but the function doesn’t fire when a custom post type is either published or updated. Is there a similar hook as add_action( 'wp_after_insert_post' I can use?

0
Motivated 1 month 2023-02-07T03:08:53-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse