Home Forums ACF PRO Save edited post as pending / add acf field title Reply To: Save edited post as pending / add acf field title

  • I then tried to repeat something similar to ADD the post title upon first submit from the same acf field with the help of this explanation.

    After testing with exits, I noticed new_post is never the variable so it never reaches the rest of the code.

    I echoed the post_id with an exit (before line 10) and it always returned an ID, so the script returns the ID on line 10 and never passes that.

    When I commented out the return, I got 2 new posts instead of one. One did now actually have the title as I wanted it but the second one is also inserted.

    So I removed the insert and added an update to change the post title and name.

    Can you take a look at this function and see if all looks good ?

    It appears to work as expected and all, but would like to make sure it’s all on the up and up.