I created a custom taxonomy called Newsroom Categories and was able to get the first term to display using some array values, conditional statements, and foreach loops:
<?php
$args = array( 'public' => true, '_builtin' => false, 'name' => 'newsroom_categories' );
$output = 'names';
$operator = 'and';
$taxonomies = get_taxonomies($args,$output,$operator);
if ($taxonomies) {
foreach ($taxonomies as $taxonomy ) {
$terms = get_terms($taxonomy);
$count = count($terms);
if ( $count > 0 ){
foreach ( $terms as $term ) {
$termlinks = get_term_link($term,$taxonomy);
}
}
}
}?>
<a href="<?php echo $termlinks;?>"><?php echo $term->name;?></a>
However no matter what term is selected in the page editor, only the first term is the only one that renders. How do I get more than the first term to display? Any input would be greatly appreciated.