Separator for custom terms display
-
I have this code that displays all the custom terms of a specific custom taxonomy(XYZ). Would someone be kind enough to add to this to get it to have an unlinked comma between each term but not after the last term.
Many thanks, Pete
<?php $args = array('taxonomy' => 'XYZ'); ?> <?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; ?>
- The topic ‘Separator for custom terms display’ is closed to new replies.