/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getTheTerms($tax) { $args = array( 'taxonomy' => $tax, 'hide_empty' => 1 ); $terms = get_terms($tax, $args); foreach ($terms as $term) { ?> <li><a href="<?php echo get_bloginfo('wpurl'); ?>/taxonomyrewrite/<?php echo $term->slug; ?>/" title="<?php echo $term->name; ?>"><?php echo $term->name; ?></a></li> <?php } }//getTheTerms