Skip to content

Commit

Permalink
#35 bfs course tax - add class on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
eoxia-amandine committed Mar 29, 2023
1 parent f9e3d6c commit 14890d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions inc/blocks/bfs-course-tax/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
endif;


$terms_list = get_the_term_list( get_the_ID(), 'course-category', '', ' ', '' );
$terms_list = get_the_terms( get_the_ID(), 'course-category' );

if ( ! empty( $terms_list ) ) :
?>
<div class="<?php echo esc_attr( $classes ); ?>">
<?php echo $terms_list; ?>
<?php foreach( $terms_list as $term ) : ?>
<a href="<?php echo get_term_link( $term->slug, 'course-category'); ?>" rel="tag" class="bfs-course-tax__id-<?php echo $term->term_id; ?>"><?php echo $term->name; ?></a>
<?php endforeach; ?>
</div>
<?php
<?php
endif;

0 comments on commit 14890d5

Please sign in to comment.