Last active
August 29, 2015 14:25
-
-
Save deepak125/0355ac329c8e0198357c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<div class="page-title-container"> | |
<div class="container"> | |
<?php the_breadcrumb(); ?> | |
</div> | |
</div> | |
<div id="page-wrapper" class="row-fluid fullwidth search-wrapper <?php echo strtolower(get_the_title()); ?>-wrapper"> | |
<div class="container search-container"> | |
<div class="row"> | |
<!--aside bar---> | |
<div id="sidebar-search-wrap" class="col-sm-4 col-md-3"> | |
<h4 class="search-results-title"><i class="fa fa-search"></i><b><?php echo do_shortcode('[facetwp counts="true"]'); ?></b></h4> | |
<div class="toggle-container filters-container"> | |
<div class="panel arrow-right"> | |
<h4 class="panel-title"> | |
<a data-toggle="collapse" href="#price-filter" class="">Price</a> | |
</h4> | |
<div id="price-filter" class="panel-collapse in"> | |
<div class="panel-content"> | |
<?php | |
echo facetwp_display('facet', 'last_minutes_price'); | |
?> | |
</div><!-- end content --> | |
</div> | |
</div> | |
<div class="panel arrow-right"> | |
<h4 class="panel-title"> | |
<a data-toggle="collapse" href="#rating-filter" class="">User Rating</a> | |
</h4> | |
<div id="rating-filter" class="panel-collapse in filters-container"> | |
<div class="panel-content"> | |
<div class="rating"> | |
<?php | |
echo facetwp_display('facet', 'last_minutes_ratings'); | |
?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="panel arrow-right"> | |
<h4 class="panel-title"> | |
<a data-toggle="collapse" href="#byland" class="">Land</a> | |
</h4> | |
<div id="byland" class="panel-collapse in"> | |
<div class="panel-content"> | |
<div class="check-square filters-option"> | |
<?php | |
echo facetwp_display('facet', 'last_minutes_country'); | |
?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="panel arrow-right"> | |
<h4 class="panel-title"> | |
<a data-toggle="collapse" href="#accomodation-type-filter" class="">Accomodation Type</a> | |
</h4> | |
<div id="accomodation-type-filter" class="panel-collapse in"> | |
<div class="panel-content"> | |
<div class="check-square filters-option"> | |
<?php | |
echo facetwp_display('facet', 'last_minute_acco'); | |
?> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!---end asidebar--> | |
<!---search main content---> | |
<div class="col-sm-8 col-md-9" id="search-content"> | |
<!--short by---> | |
<div class="sortby-section"> | |
<h4 class="sort-by-title">Sort results by:</h4> | |
<ul class="short-bar"> | |
<li><?php echo do_shortcode('[facetwp per_page="true"]'); ?></li> | |
<li><?php echo do_shortcode('[facetwp sort="true"]'); ?></li> | |
</ul> | |
</div> | |
<!--end short by--> | |
<?php | |
if (($_GET['search_term']) != '') { | |
$search_term = $_GET['search_term']; | |
} | |
$args_for_featured = array( | |
'post_type' => $_GET['post_type'], | |
'posts_per_page' => 10, | |
'facetwp' => true, // we added this | |
'meta_query' => array( | |
'relation' => 'OR', | |
array( | |
'key' => 'city', | |
'value' => $search_term, | |
'compare' => 'LIKE', | |
), | |
array( | |
'key' => 'country', | |
'value' => $search_term, | |
'compare' => 'LIKE', | |
), | |
array( | |
'key' => 'continent', | |
'value' => $search_term, | |
'compare' => 'LIKE', | |
), | |
), | |
); | |
$query = new WP_Query($args_for_featured); | |
?> | |
<div class="listing facetwp-template"> | |
<?php while ($query->have_posts()) : $query->the_post(); ?> | |
<?php $meta = get_post_meta(get_the_ID()); ?> | |
<article class="list-box"> | |
<figure class="col-sm-5 col-md-4"> | |
<a title="" href="<?php echo $meta['url'][0]; ?>" target="_blank" class="hover-effect"><?php | |
if (has_post_thumbnail()) { | |
the_post_thumbnail(); | |
} else { | |
?> | |
<img width="270" height="160" alt="" src="<?php bloginfo('template_url'); ?>/img/1.png"> | |
<?php | |
} | |
?></a> | |
</figure> | |
<div class="detail col-sm-7 col-md-8"> | |
<header> | |
<div class="header-title"> | |
<h4 class="box-title"><?php the_title(); ?><small><i class="fa fa-map-marker yellow-color"></i> <?php echo $meta['city'][0] . ", " . $meta['region'][0] . ", " . $meta['country'][0]; ?></small></h4> | |
</div> | |
<div class="fiveratiing"> | |
<div class="rating"> | |
<?php | |
$dest_rating = $meta['rating'][0]; | |
for ($i = 0; $i < 5; $i++) { | |
?> | |
<span <?php if ($i == 5 - $dest_rating) echo 'class="active"'; ?>></span> | |
<?php | |
} | |
?> | |
</div> | |
</div> | |
</header> | |
<p><?php content(50); ?></p> | |
<div class="price"><?php echo $meta['price-currency'][0] . " " . $meta['price'][0]; ?></div> | |
<a href="<?php echo $meta['url'][0]; ?>" target="_blank" class="select-btn">Book Now</a> | |
</div> | |
</article> | |
<?php | |
endwhile; | |
?> | |
<?php | |
echo facetwp_display('pager'); | |
?> | |
</div><!---end search listing--> | |
</div> | |
</div> | |
</div><!--End container--> | |
</div><!--End Post Wrapper--> | |
<?php include 'block/bottom-section.php' ?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment