<section id="property" class="padding bg_gallery">
<div class="container">
<div class="row">
<div class="col-sm-12 text-center">
<h2 class="uppercase"><?php the_field('real_estate_title');?> </h2>
<p class="heading_space"><?php the_field('real_estate__sub_title'); ?></p>
</div>
</div>
<?php
// $arfield = array('rent','sale')
$terms = get_terms(array('taxonomy' => 'property_category', 'include' => array(8,7),) );
$count = count($terms); ?>
<div class="clearfix">
<div id="filters-property" class="cbp-l-filters-button text-center">
<div data-filter=".latest" class="cbp-filter-item-active cbp-filter-item">LATEST</div>
<?php
foreach ($terms as $term) {
echo $term_list = '<div data-filter=".'. $term->slug .'" class="cbp-filter-item">' . $term->name . '</div>';
}
?>
</div>
</div>
<div id="property-gallery" class="cbp listing1">
<?php $wpbp = new WP_Query(array( 'post_type' => 'property', 'posts_per_page' =>-1 ) ); ?>
<?php if ($wpbp->have_posts()) : while ($wpbp->have_posts()) : $wpbp->the_post(); ?>
<?php $terms1 = get_the_terms( get_the_ID(), 'property_category' ); ?>
<div class="cbp-item latest <?php foreach ($terms1 as $term){ echo $term->slug; } ?>">
<div class="property_item">
<div class="image">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium');?></a>
<div class="price clearfix">
<span class="tag pull-right"><?php the_field('price');?></span>
</div>
<span class="tag_t">For Sale</span>
<span class="tag_l">Featured</span>
</div>
<div class="proerty_content">
<div class="proerty_text">
<h3 class="captlize"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p><?php the_field('property_address');?></p>
</div>
<div class="property_meta transparent">
<span><i class="icon-select-an-objecto-tool"></i><?php the_field('property_size');?></span>
<span><i class="icon-bed"></i><?php the_field('office_rooms');?></span>
<span><i class="icon-safety-shower"></i><?php the_field('bathrooms');?></span>
</div>
<div class="property_meta transparent bottom30">
<span><i class="icon-old-television"></i><?php the_field('tv_lounge');?></span>
<span><i class="icon-garage"></i><?php the_field('garages');?></span>
<span></span>
</div>
<div class="favroute clearfix">
<p><i class="icon-calendar2"></i> <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?></p>
<ul class="pull-right">
<li><a href="javascript:void(0)"><i class="icon-like"></i></a></li>
<li><a href="#seventy" class="share_expender" data-toggle="collapse"><i class="icon-share3"></i></a></li>
</ul>
</div>
<div class="toggle_share collapse" id="seventy">
<ul>
<li><a href="<?php echo $f2 = get_field('facebook', 'option');?>/sharer.php?u=<?php the_title(); ?>" class="facebook"><i class="icon-facebook-1"></i> Facebook</a></li>
<li><a href="<?php echo $tw2 = get_field('twitter', 'option');?>/share?url=<?php the_title(); ?>" class="twitter"><i class="icon-twitter-1"></i> Twitter</a></li>
<li><a href="<?php echo $ve = get_field('vimo', 'option');?>/share?url=<?php the_title(); ?>" class="vimo"><i class="icon-vimeo3"></i> Vimeo</a></li>
</ul>
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>
</div>
<div class="col-sm-12 text-center top20">
<div class="btn-dark border_radius uppercase margin40" id="loadMore" style="">more listings</div>
</div>
</div>
</section>
- <a href=”/sharer.php?u=”>Facebook
- <a href=”/share?url=”>Twitter
- <a href=”/share?url=”>Vimeo
more listings