Home › Forums › ACF PRO › update field is updating value in database but on the frontend › Reply To: update field is updating value in database but on the frontend
As long as $team_code
is a post ID (Integer) that represents the post you want to set the field and $post_id
is the post ID of the post where you want to set this value and you use the field key for the field and this field is not some type of a sub field, like a field in a group field, or a clone field, or a repeater or flex field then
update_field($field_key, $team_code, $post_id);
should be updating the field.
If the field is being set in the DB and your not seeing it on the front end, do you see this change in the admin?
Do you have any caching plugins installed that would prevent this change being reflected on the front end?
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.