jomarkosabel (July 18th, 2017)
/**
* Inserts the meta in the single listing item head.
*
* @since 4.0.0
*
* @return string
*/
function va_add_listing_item_meta() {
?>
<li class="listing-address"><?php echo the_listing_address(); ?></li>
<?php if ( $phone = get_post_meta( get_the_ID(), 'phone', true ) ) { ?>
<li class="listing-phone fa-icon fa-phone"><a href="tel:<?php echo esc_attr( va_phone_url( $phone ) ); ?>" class="text-muted"><?php echo $phone; ?></a></li>
<?php } ?>
<li class="listing-categories">
<?php
if ( $terms = get_the_terms( get_the_ID(), VA_LISTING_CATEGORY ) ) {
foreach ( $terms as $term ) {
//if ( 0 == $term->parent ) {
echo '<span class="listing-parent-category label"><a href="' . get_term_link( $term->slug, VA_LISTING_CATEGORY ) . '">' . $term->name . '</a></span>';
//}
//unset( $term );
}
}
?>
</li>
<?php
}
add_action( 'va_listing_item_meta', 'va_add_listing_item_meta' );
jomarkosabel (July 18th, 2017)
There are currently 1 users browsing this thread. (0 members and 1 guests)