jpcontrerasv
7/30/2014 - 2:53 PM

Enlistar taxonomías

Enlistar taxonomías

<?php
//list terms in a given taxonomy (useful as a widget for twentyten)
$taxonomy = 'tipos-de-tiendas';
$tax_terms = get_terms($taxonomy);
?>

<ul>
<?php
foreach ($tax_terms as $tax_term) {
echo '<li>' . '<a href="' . esc_attr(get_term_link($tax_term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $tax_term->name ) . '" ' . '>' . $tax_term->name.'</a></li>';
}
?>
</ul>