Home › Forums › General Issues › Get terms of relationship field › Reply To: Get terms of relationship field
This should work and do what I want, but it does not work. Someone to help ?? I do not know where I’m going wrong.
$args = array(
'taxonomy' => 'custom_taxonomy',
'orderby' => 'name',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'my_custom_field', // name of custom field
'value' => "{$post_id}", // matches exactly "123", not just 123. This prevents a match for "1234"
'compare' => 'LIKE'
)
);
$atv = get_terms($args);
var_dump($atv)
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.