Home › Forums › Backend Issues (wp-admin) › The updated field is not refreshed › Reply To: The updated field is not refreshed
So I’ve changed my code :
add_action('acf/save_post', 'save_commune');
function save_commune( $post_id ) {
global $post;
$cat_id = wp_create_category( $post->post_title, 0 );
$field = get_field_object('cat_id');
update_field($field['key'], $cat_id, $post_id );
}
But unfortunately when I save the post with a title. It still shows an empty select for my Taxonomy field. I need to manually refresh the page to see the selected value.
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.