How can I list all the categories under a Custom Post Type (taxonomy)?

If you just want to list them you can use the get_terms function:

$terms = get_terms( 'my_taxonomy' );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
 echo '<ul>';
 foreach ( $terms as $term ) {
   echo '<li>' . $term->name . '</li>';

 }
 echo '</ul>';
}

Read the codex, it has a lot of examples:
https://codex.wordpress.org/Function_Reference/get_terms

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)