Home › Forums › Backend Issues (wp-admin) › acf/pre_save_post not working on Backend › Reply To: acf/pre_save_post not working on Backend
That’s because the $post_id on the back end will never == ‘new_post’. You also will not need to update or insert a post.
What you need is 2 function/filters
On the back end filter/function you only need to deal with the .zip file.
On the front end filter/function, insert the new post and then call the function that deals with the .zip file.
Either that or have to separate functions that do all the work and remove the check at the top and inserting the post from the backend function.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
❓Ever wondered when and why ACF uses JSON instead of the database? Check out our summary of the most recent session of ACF Chat Friday for the answer, and make sure to register for the next session.
— Advanced Custom Fields (@wp_acf) February 23, 2023
👉 https://t.co/3UtvQbDwNmhttps://t.co/wfFEVcXVKc
© 2023 Advanced Custom Fields.
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.