false,
'parent' => 0,
);
$terms = get_terms($taxonomy, $args);
foreach($terms as $term) {
echo '
';
echo '
';
}
?>
'.$term->name.'
'; $args = array('post_type' => 'menu', 'tax_query' => array( array( 'taxonomy'=> 'menu_categories', 'field' => 'slug', 'terms' =>$term->slug, 'include_children' => false, ), ), ); $loop = new WP_Query($args); if($loop->have_posts()) { while($loop->have_posts()) : $loop->the_post(); ?> description) echo ''.$term->description.'
'; $args = array( 'parent' => $term->term_id, 'hide_empty' => false, ); $subterms = get_terms($taxonomy, $args); foreach($subterms as $subterm) { echo '';
echo '
';
}
echo ''.$subterm->name.'
'; if($subterm->slug=='traditional-pizza') echo ''.$subterm->description.'
'; $args = array('post_type' => 'menu', 'tax_query' => array( array( 'taxonomy'=> 'menu_categories', 'field' => 'slug', 'terms' =>$subterm->slug, 'include_children' => false, ), ), ); $loop = new WP_Query($args); if($loop->have_posts()) { while($loop->have_posts()) : $loop->the_post(); ?> slug=='traditional-pizza') echo ' '; else { echo ''.$subterm->description.'
'; } echo '