LISTING RESULTS
Recommended
Show Filters
Features
View Map Above

<?php
$terms = get_the_terms(get_the_ID(), 'listing-type');
if (!empty($terms) && !is_wp_error($terms)) {
// Filter to only parent terms
$parent_terms = array_filter($terms, function($term) {
return $term->parent === 0;
});
// If no parent terms, use all terms
if (empty($parent_terms)) {
$parent_terms = $terms;
}
// Get the first term
$first_term = reset($parent_terms);
echo esc_html($first_term->name);
}
?>Featured
New
Offers
McNeilly Insurance
3869 Clairemont Drive, San Diego, CA, USA
Comprehensive insurance solutions for home, auto, life, and business. With access to dozens of carriers...

<?php
$terms = get_the_terms(get_the_ID(), 'listing-type');
if (!empty($terms) && !is_wp_error($terms)) {
// Filter to only parent terms
$parent_terms = array_filter($terms, function($term) {
return $term->parent === 0;
});
// If no parent terms, use all terms
if (empty($parent_terms)) {
$parent_terms = $terms;
}
// Get the first term
$first_term = reset($parent_terms);
echo esc_html($first_term->name);
}
?>New
Offers
Canyon Villas Retirement Community
4282 Balboa Avenue, San Diego, CA, USA
With multiple levels of care, we empower our residents to age gracefully in a familiar...