$term = get_queried_object();
$args = array(
'menu_order' => 'ASC',
'hide_empty' => 1,
'hierarchical' => 1,
'taxonomy' => 'cursos_cat',
'pad_counts' => 1,
);
$product_categories = get_categories( $args );
$product_category_found = false;
//print_r($product_categories);
if ( $product_categories ) {
foreach ( $product_categories as $category ) {
if ($category->term_id == $term->parent){
$images = get_field('slide_categories',$category);
if( $images ){ //Condicional per entrar les imatges slide de cada programa ?>
$args = array(
'exclude' => $term->parent,
'menu_order' => 'ASC',
'hide_empty' => 1,
'hierarchical' => 1,
'taxonomy' => 'cursos_cat',
'pad_counts' => 1
);
custom_list_categories( $args );
?>
}
}
}
}
?>