Home › Forums › Front-end Issues › new value is shown only after refresh page on update_field › Reply To: new value is shown only after refresh page on update_field
Move your entire block of code that starts with
if (isset($_POST['update_social_media'])) {
to before you get the field, updating happens before display. Then if the value has been updated instead of getting the value you can just skip that and us the submitted value. Then you only need to get the value it it is not present in $_POST.
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.