-
-
Save raaar/3188743 to your computer and use it in GitHub Desktop.
WORDPRESS: List of Taxonomy itemes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//list terms in a given taxonomy | |
$taxonomy = 'news-category'; | |
$tax_terms = get_terms($taxonomy); | |
?> | |
<ul class="categories"> | |
<?php | |
foreach ($tax_terms as $tax_term) { | |
echo '<li><h3>' . '<a href="' . esc_attr(get_term_link($tax_term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $tax_term->name ) . '" ' . '>' . $tax_term->name.'</a><h3></li>'; | |
} | |
?> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment