Hey gang!
Trying to fetch a nested taxonomy field’s terms within an ACF flexible content field. Any ideas on how to get this to return only the terms for the contained Flexible Layout row?
$row_index = get_row_index();
$term_ids = get_sub_field("core_sections_flexible_layouts_{$row_index}_termsss");
$term_ids = is_array($term_ids) ? $term_ids[0] : [];
$args = array(
'taxonomy' => 'grouping',
'include' => $term_ids,
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => false
);
$term_query = new WP_Term_Query($args);
return $term_query->terms;