“add_action” not run after post publication
-
Hi.
How I can run function when I publish post from ACF Frontend? When I publish post from WordPress admin console, its work. But when I publish from ACF Frontend Its not. My code in functions.php:
add_action('wp_insert_post_data', 'my_func', 1, 2); function my_func($data, $postarr) { if ($data['post_type'] == 'my_custom_type_post' && $data['post_status'] != 'publish') { //... } }
I use Elementor Pro for post creating page.
- The topic ‘“add_action” not run after post publication’ is closed to new replies.