Home › Forums › Add-ons › Flexible Content Field › List of slugs from custom post taxonomy for loop › Reply To: List of slugs from custom post taxonomy for loop
thank you for your answer. I allready found a solution with the help of a developer.
It seems quite similar to yours.
Just for anyone who’s interested:
$locations = get_sub_field(‘orte_eingrenzen’);
$locationsSelected = array();
foreach( $orte as $ort ):
$locationsSelected = $ort->slug;
$loop = new WP_Query( array( ‘post_type’ => ‘kurse’, ‘posts_per_page’ => 99, ‘meta_key’ => ‘datum’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘ASC’,
‘tax_query’ => array(
‘taxonomy’ => ‘loacations’,
‘field’ => ‘slug’,
‘terms’ => $locationsSelected
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!
Plugin boilerplates can do some of the heavy lifting during initial development. We look at four options to speed up your plugin creation. https://t.co/ZtMsdBxAHw— Advanced Custom Fields (@wp_acf) June 5, 2023
© 2023 Advanced Custom Fields.