<?php
$terms = get_terms( array(
'taxonomy' => 'category',
'orderby' => 'name',
'hide_empty' => false,
'count' => false,
'hierarchical' => true,
) );
$terms = wp_list_filter( $terms, array('parent'=>0) ); // Если надо вывести только рубрики верхнего уровня
?>
<?php
if( $terms && ! is_wp_error($terms) ){
foreach( $terms as $term ){
echo "<a href='". get_term_link( (int) $term->term_id, 'category' ) ."'>". $term->name ."</a>";
}
}
?>