Your CPT and your CT init seem to be right, but the way you get the taxonomy terms is incomplete.
If you look in WordPress Codex, the function get_terms(); accepts two parameters:
- $taxonomies
- $args
If you want to get only parent terms you have to specified it in your $args array.
$args = array(
'parent' => 0 // queries only top level terms of a specify taxonomy or taxonomies ( first argument, rememberer? )
);
So in your case, try this:
<?php
$taxonomy = 'btp_work_category';
$terms = get_terms($taxonomy, array( 'parent' => 0 ) ); // Get all top level terms of a taxonomy
if ( $terms && !is_wp_error( $terms ) ) :
?>
<ul>
<?php foreach ( $terms as $term ) { ?>
<li><a href="https://wordpress.stackexchange.com/questions/172109/<?php echo get_term_link($term->slug, $taxonomy); ?>"><?php echo $term->name; ?></a></li>
<?php } ?>
</ul>
<?php endif;?>
Hope it’s helps!