Home › Forums › Backend Issues (wp-admin) › The updated field is not refreshed › Reply To: The updated field is not refreshed
This results in no field object being returned if the field has no entry in the DB for the current post.
$field = get_field_object('cat_id');
Even if you do it this way
$field = get_field_object('cat_id', $post_id);
ACF must find the field key reference in the DB for this field on this post. Since there is nothing in the DB ACF cannot get the field key reference and this means it cannot find the correct field definition. You must supply the field key.
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.