Heilpflanzen

taxonomy, array( 'child_of' => $current_kategorie->term_id, ) ); $query_args = array( 'post_type' => 'heilpflanzen', 'posts_per_page' => - 1,'order' => 'ASC','orderby'=>'title' ); if ( empty( $child_locations ) ) { $query_args['tax_query'] = array( array( 'taxonomy' => $current_kategorie->taxonomy, 'terms' => $current_kategorie->term_id, ), ); $distributors = new WP_Query( $query_args ); while ( $distributors->have_posts() ) : $distributors->the_post(); get_template_part( 'content-heilpflanzen', get_post_format() ); endwhile; } else { foreach ( $child_locations as $location ) { echo '

' . esc_html( $location->name ) .'

' ; $query_args['tax_query'] = array( array( 'taxonomy' => $location->taxonomy, 'terms' => (int)$location->term_id, 'field' => $location->slug, ), ); $distributors = new WP_Query( $query_args ); while ( $distributors->have_posts() ) : $distributors->the_post(); get_template_part( 'content-heilpflanzen', get_post_format() ); endwhile; } }?>