我可以用下面的代码来回答我的问题吗。
<?php $args = array(\'taxonomy\' => \'blogcategory\'); ?>
<?php $tax_menu_items = get_categories( $args );
foreach ( $tax_menu_items as $tax_menu_item ):?>
<a href="<?php echo get_term_link($tax_menu_item,$tax_menu_item->taxonomy); ?>">
<?php echo $tax_menu_item->name; ?>
</a>
<?php endforeach; ?>
我是从
hereUpdated: I found the answer I was looking for
<?php
$taxonomy = \'blogcategory\';
$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>