object is coming back as an array, which we can’t seem to get the name of for some reason. I have tried
$term = wp_get_object_terms($post->ID, 'myterm'); $first_term = $term; $term_name = $first_term->name; $new_title = $post_id.'- '.$term_name;
to to avail. my php is quite limited so I’m sure I am not going about this the right way. post ID shows, but I either get an array, or nothing. The case above results in nothing, but if I set new_title to $term it will say array
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!
© 2022 Advanced Custom Fields.