JezK
Edit File: temp-tour-result.php
<?php get_header();?> <div id="headback"> <div class="titleheader"> <?php if ($oketheme['translate'] == 'id') {?> <h1><i class="glyphicon glyphicon-search"></i> Hasil Pencarian Tour <span class="vsmall"></h1> <?php } else {?> <h1><i class="glyphicon glyphicon-search"></i> Tour Search Result <span class="vsmall"></h1> <?php } ?> </div> <?php if (($oketheme['toursearch_act']) && ($oketheme['tour_on']['coll'])) {tour_search();}?> </div> <div id="conwrap"> <?php $list = array(); $item = array(); foreach ($_POST as $key => $value) { if ($value != '') { $item['taxonomy'] = htmlspecialchars($key); $item['terms'] = htmlspecialchars($value); $item['field'] = 'slug'; $list[] = $item; } } $cleanArray = array_merge(array('relation' => 'AND'), $list); $args['post_type'] = 'tour'; $args['showposts'] = -1; $args['tax_query'] = $cleanArray; $the_query = new WP_Query($args); if ($oketheme['translate'] == 'id') { echo ($the_query->found_posts > 0) ? '<div class="notice" style="margin-bottom:20px"><h2 style="margin:0;text-align:center">Nice... ditemukan <u>' . $the_query->found_posts . ' tour</u> yang sesuai dengan kriteria pencarian Anda!</h2></div>' : '<div class="warning" style="margin:0;text-align:center"><h2>Tidak ditemukan hasil dari pencarian ini, silahkan lakukan pencarian ulang.</h2><a href="' . home_url() . '/tour"><button><i class="glyphicon glyphicon-check"></i> Semua Tour</button></a></div>'; } else { echo ($the_query->found_posts > 0) ? '<div class="notice" style="margin-bottom:20px"><h2 style="margin:0;text-align:center">Nice... found <u>' . $the_query->found_posts . ' tour(s)</u> that match your search criteria!</h2></div>' : '<div class="warning" style="margin:0;text-align:center"><h2>Sorry, no results found from this search.</h2><a href="' . home_url() . '/tour"><button><i class="glyphicon glyphicon-check"></i> All Tours</button></a></div>'; } if ($the_query->found_posts > 0) echo '<div class="gridpad">'; while ($the_query->have_posts()): $the_query->the_post(); get_template_part('loop-tour'); endwhile; echo '</div>';?> </div> <?php get_footer(); ?>