function imicPropertyDetailById($id) { $property_pin = get_post_meta($id, 'imic_property_pincode', true); $property_address = get_post_meta($id, 'imic_property_site_address', true); $city_type = wp_get_object_terms($id, 'city-type', array('fields' => 'ids')); $property_city = ''; if (!empty($city_type)) { $city_term = get_term($city_type[0], 'city-type'); $property_city = $city_term->name; } $property_id = imicPropertyId($id); if (!empty($property_id)) { echo '<strong>' . __('Property ID', 'framework') . ':</strong> ' . get_post_meta($id, 'imic_property_site_id', true) . '<br/>'; } if (!empty($property_address)) { echo '<strong>' . __('Property Address', 'framework') . ':</strong> ' . $property_address; } if ($property_pin != '') { echo '<br/><strong>' . __('Pin Code ', 'framework') . ':</strong> ' . $property_pin; } if ($property_city != '') { echo '<br/><strong>' . __('Property City ', 'framework') . ':</strong> ' . $property_city; } }
<span class="images-count"><i class="fa fa-picture-o"></i> <?php echo $total_images; ?> </span> <span class="badges"><?php echo $property_term_type; ?> </span> </a> <div class="property-info"> <h4><a href="<?php the_permalink(); ?> "><?php echo get_the_title(); ?> </a><?php echo imicPropertyId(get_the_ID()); ?> </h4> <?php if (!empty($property_city)) { echo '<a class="accent-color" data-original-title="' . $sl . '" data-toggle="tooltip" style="cursor:default; text-decoration:none;" href="javascript:void(0);"><span class="location">' . $property_city . '</span></a><br>'; } if (!empty($property_price)) { echo '<div class="price"><strong>' . $currency_symbol . '</strong><span>' . $property_price . '</span></div>'; } ?> </div> <?php } if (!empty($property_area) || !empty($property_baths) || !empty($property_beds) || !empty($property_parking)) { echo '<div class="property-amenities clearfix">';
$property_area_location = wp_get_object_terms(get_the_ID(), 'city-type'); $sl = ''; $total_area_location = count($property_area_location); $num = 1; foreach ($property_area_location as $sa) { $conc = $num != $total_area_location ? '->' : ''; $sl .= $sa->name . $conc; $num++; } echo '<div class="col-md-8">'; if (!empty($imic_property_site_address) || !empty($imic_property_site_city) || !empty($imic_property_price)) { echo '<div class="property-info">'; if (!empty($imic_property_price)) { echo '<div class="price"><strong>' . $currency_symbol . '</strong><span>' . $imic_property_price . '</span></div>'; } echo '<h3><a href="' . get_permalink() . '">' . get_the_title() . '</a>' . imicPropertyId(get_the_ID()) . '</h3>'; if (!empty($imic_property_site_city)) { echo '<a class="accent-color" data-original-title="' . $sl . '" data-toggle="tooltip" style="cursor:default; text-decoration:none;" href="javascript:void(0);"><span class="location">' . $imic_property_site_city . '</span></a>'; } echo imic_excerpt(10); echo '</div>'; } $imic_property_area = get_post_meta(get_the_ID(), 'imic_property_area', true); $imic_property_baths = get_post_meta(get_the_ID(), 'imic_property_baths', true); $imic_property_beds = get_post_meta(get_the_ID(), 'imic_property_beds', true); $imic_property_parking = get_post_meta(get_the_ID(), 'imic_property_parking', true); if (!empty($imic_property_area) || !empty($imic_property_baths) || !empty($imic_property_beds) || !empty($imic_property_parking)) { echo '<div class="property-amenities clearfix">'; if (!empty($imic_property_area)) { echo '<span class="area">' . $imic_property_area . '<strong></strong>' . __('Area', 'framework') . '</span>'; }