Home Forums Backend Issues (wp-admin) acf/save_post only working after save on backend


acf/save_post only working after save on backend

    • adam_g

    • June 27, 2019 at 12:40 am

    I’ve created a function to updated the post title and post name within a form.

    add_action('acf/save_post', 'chiwp_update_post_name', 20);
    function chiwp_update_post_name($post_id)
      $desired_url = get_field('show_information', $post_id);
      $desired_url = $desired_url['desired_url_extension'];
      $title = get_field('show_information', $post_id);
      $title = $title['show_name'];
      $data = array(
        'ID'         => $post_id,
        'post_title' => $title,
        'post_name'  => sanitize_title($desired_url),

    However, the front end displays only the new title and slug info correctly initially.

    In other words, all the other form data is saved to the back end correctly, but it does not appear on the front end until I manually “save draft” in the admin. Then everything works properly.

    What am I missing within the function to save all the data at the right time?

  • Did you ever get an answer to this?

  • save post action but not on post creation?

  • solved this? I want to make the download from frontend and same function.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.