• 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.

    • This topic was modified 1 year, 5 months ago by lavzza.
    • This topic was modified 1 year, 5 months ago by lavzza.
  • The topic ‘“add_action” not run after post publication’ is closed to new replies.