List Display Custom Taxonomy
Thu Jul 06 2023 11:51:24 GMT+0000 (Coordinated Universal Time)
Saved by
@gshailesh27
<?php
$terms = get_terms( 'resources-category' );
foreach ( $terms as $term ) :
$class99='';
if($_GET['cat']==$term->slug) $class99='active';?>
<a href="/resources-list/page/1/?getby=cat&cat=<?php echo esc_attr( $term->slug ); ?>" class="btn rounded-pill <?php echo $class99; ?>">
<?php echo esc_html( $term->name ); ?></a>
<?php endforeach; ?>
content_copyCOPY
Comments