$categories = get_terms( 'category', array('hide_empty' => false, 'orderby' => 'name', 'parent' => 0) ); if ( $categories ) { echo '
    '; foreach ( $categories as $category ) { include 'templates/loop-category.php'; } echo '
'; }