Home › Forums › Front-end Issues › Setting Parent Posts from Frontend › Reply To: Setting Parent Posts from Frontend
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[0];
$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!
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.