removing terms from li
-
I am having trouble removing/showing terms in two lists from the same taxonomy. I would like to show only certain terms from the a taxonomy in one list and the same for another. I have included the code that shows the lists below, any help is much appreciated!
<div id="primary"> <div id="content" role="main"> <div> <p> <?php $terms = get_terms("tagportfolio"); $count = count($terms); echo '<ul id="portfolio-filter">'; if ( $count > 0 ){ foreach ( $terms as $term ) { $include = $termname = strtolower($term->name); $termname = str_replace(' ', '-', $termname); echo '<li><a href="#'.$termname.'" title="" rel="'.$termname.'">'.$term->name.'</a></li>'; } } echo "</ul>"; ?> <?php $terms = get_terms("tagportfolio"); $count = count($terms); echo '<ul id="portfolio-filter">'; if ( $count > 0 ){ foreach ( $terms as $term ) { $termname = strtolower($term->name); $termname = str_replace(' ', '-', $termname); echo '<li><a href="#'.$termname.'" title="" rel="'.$termname.'">'.$term->name.'</a></li>'; } } echo "</ul>"; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘removing terms from li’ is closed to new replies.