Posted By

migueltavares on 11/01/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

DaR3Y


[Wordpress] Get TERMS List


 / Published in: PHP
 

  1. function getTheTerms($tax) {
  2. $args = array( 'taxonomy' => $tax, 'hide_empty' => 1 );
  3. $terms = get_terms($tax, $args);
  4. foreach ($terms as $term) { ?>
  5. <li><a href="<?php echo get_bloginfo('wpurl'); ?>/taxonomyrewrite/<?php echo $term->slug; ?>/" title="<?php echo $term->name; ?>"><?php echo $term->name; ?></a></li>
  6. <?php }
  7. }//getTheTerms

Report this snippet  

You need to login to post a comment.