Home › Forums › Backend Issues (wp-admin) › Check for Update Instead of New › Reply To: Check for Update Instead of New
Were your able to figure this out.
I don’t think there is a way to directly tell if a new post is being created or an existing post is being updated. If this was a front end form you could use the acf/pre_save_post hook.
On the back end I would probably do something like
– existing posts have a hidden meta value (field name starts with an underscore)
– when my save post function runs test to see if the value is set
– if not then it’s a new post
– before my function is done, set this value so it will test positive the next time the post is saved.
~JH
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.