false, 'parent' => 0, ); $terms = get_terms($taxonomy, $args); foreach($terms as $term) { 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(); ?>