1
我需要把主动类的<li>
所以,当你在一个team_category它会显示<li class="active">
添加一个wordpress的主动类
<?php
$sport = get_terms('team_category');
if($sport){
?><ul><?php
foreach($sport as $s){ ?>
<li><a href="<?php echo get_term_link($s->slug, 'team_category') ?>"><?php echo $s->name; ?></a></li>
<?php }
?></ul><?php
}
?>
什么是$ current_team !!! – deemi
我发明了一些代表“如果你处于team_category”部分的问题。 – AmazingDreams