<?php
if ( ! function_exists( 'gomo_get_all_locations' ) ) :
function gomo_get_all_locations() {
$terms = get_terms( array(
'taxonomy' => 'location',
'hide_empty' => true,
) );
foreach ( $terms as $term ) {
$term_link = get_term_link( $term );
$term_name = $term->name; ?>
<a class="button button-margin" href="<?php echo $term_link; ?>" title="<?php echo $term_name; ?>"><?php echo $term_name; ?></a>
<?php
}
}
endif;
<?php
if ( ! function_exists( 'gomo_get_all_locations' ) ) :
function gomo_get_all_locations() {
$terms = get_terms( array(
'taxonomy' => 'location',
'hide_empty' => true,
) );
foreach ( $terms as $term ) {
$term_link = get_term_link( $term );
$term_name = $term->name; ?>
<a class="button button-margin" href="<?php echo $term_link; ?>" title="<?php echo $term_name; ?>"><?php echo $term_name; ?></a>
<?php
}
}
endif;