JezK
Edit File: single-tour.php
<!-- Single Tour - Oketheme.com --> <?php include (TEMPLATEPATH . '/functions/createbook.php'); $t = $oketheme['translate']; get_header(); if (have_posts()): while (have_posts()) : the_post(); setPostViews(get_the_ID());?> <div id="headback"> <div class="tourbox"> <!-- Error Message --> <?php if(isset($hasError)) { ?> <div class="warning" style="margin-bottom:20px;"> <?php if ($t == 'id') {?> <span class="tred"><i class="glyphicon glyphicon-remove"></i> Terjadi kesalahan pengisian form pemesanan, silahkan cek kembali.</span> <ul> <?php if (isset ($checkError)) {echo $checkError;} if (isset ($tamuError)) {echo $tamuError;}if (isset ($captchaError)) {echo $captchaError;}?> </ul> <?php } else {?> <span class="tred"><i class="glyphicon glyphicon-remove"></i> Error filling confirmation form, please check again.</span> <ul> <?php if (isset ($checkErrorEn)) {echo $checkErrorEn;} if (isset ($tamuErrorEn)) {echo $tamuErrorEn;}if (isset ($captchaErrorEn)) {echo $captchaErrorEn;}?> </ul> <?php } ?> </div> <?php } ?> <div class="boxview"> <?php badge_single();?> <?php $gambar = rwmb_meta( 'gambar'); if (!empty( $gambar )) { echo "<ul id='image-gallery' class='gallery list-unstyled cS-hidden'>"; foreach($gambar as $img){ $namefile = $img['name']; $urlfull = $img['full_url']; $preview = $img['sizes']['l600']['file']; $urlkecil = $img['url']; if ($preview) { $urlprev = str_replace($namefile,$preview,$urlfull); } else { $urlprev = $img['full_url']; } echo "<li data-thumb='{$urlkecil}'><img style='width:100%' src='{$urlprev}'/></li>"; } echo "</ul>"; } else if (( has_post_thumbnail()) && ( empty( $gambar ) )){ the_post_thumbnail('l600'); } else { ?> <img width="600" src="<?php echo get_template_directory_uri(); ?>/images/600.jpg" alt="<?php the_title(); ?>"> <?php } ?> </div> <div class="boxdetail"> <h1><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1> <p class="medium"> <?php the_terms( $post->ID, 'kategori', '<i class="glyphicon glyphicon-tag"></i>', ', ', ' ' );?> <?php the_terms( $post->ID, 'destinasi', '<i class="glyphicon glyphicon-map-marker" style="margin-left:15px"></i>', ', ', ' ' );?> <?php the_terms( $post->ID, 'durasi', '<i class="glyphicon glyphicon-time" style="margin-left:15px"></i>', ', ', ' ' );?> <?php if (rwmb_meta( 'flight_act')) { ?> <i class="glyphicon glyphicon-plane" style="margin-left:15px"></i> <a title="<?php echo $t=='id'?'Termasuk penerbangan':'Flight included';?>">Flight</a> <?php } if (rwmb_meta( 'hotel_act')) { ?> <i class="glyphicon glyphicon-bed" style="margin-left:15px"></i> <a title="<?php echo $t=='id'?'Termasuk hotel':'Hotel included';?>">Hotel</a> <?php } ?> </p> <?php harga_view_single(); discount_input();?> <?php if ((rwmb_meta( 'harga') == '') && (rwmb_meta( 'harpil_act') == '0') || (rwmb_meta( 'harpil_act') == '1') && (rwmb_meta('harpil')[0][1] == '')) { ?> <a href="#kontak" class="pop"> <button class="tomb"> <i class="glyphicon glyphicon-earphone"></i> <?php if ($t == 'id') {echo "Kontak Kami";} else {echo "Contact Us";} ?> </button> </a> <?php } else { ?> <?php if ($oketheme['metode_act'] == 'form') { ?> <?php $date = rwmb_meta( 'datetour'); $cdate = count($date); if ($cdate == "0") { if ($t == 'id') { echo '<input id="datetour" type="text" value="" placeholder="Tanggal Perjalanan" />'; } else { echo '<input id="datetour" type="text" value="" placeholder="Date of Trip" />'; } } else { if ($t == 'id') { echo '<select id="datetour"><option value="" disabled>Tanggal Perjalanan</option>'; } else { echo '<select id="datetour"><option value="" disabled>Date of Trip</option>'; } foreach ( $date as $x ) { echo '<option value="'.$x.'">'.$x.'</option>'; } echo '</select>'; } ?> <div class="jumdiv"> <button type="button" class="btn-number" data-type="minus" data-field="guest"><i class="glyphicon glyphicon-minus" style="margin:0"></i></button><input type="text" id="guest" name="guest" class="input-number" value="1" min="1" max="100"><button type="button" class="btn-number" data-type="plus" data-field="guest"><i class="glyphicon glyphicon-plus" style="margin:0"></i></button> </div> <div style="clear: both"></div> <div class="warningprice"></div> <div class="warningdate"></div> <?php if ($t == 'id') {?> <a href="#pesantour" class="pesan" onclick="guestinput()"><button class="tomb"><i class="glyphicon glyphicon-ok"></i> Pesan Sekarang!</button></a> <?php } else { ?> <a href="#pesantour" class="pesan" onclick="guestinput_en()"><button class="tomb"><i class="glyphicon glyphicon-ok"></i> Book Now!</button></a> <?php } disclist(); ?> <?php } else if ($oketheme['metode_act'] == 'page') { ?> <br/> <a href="<?php $howto_id=$oketheme['direct_page']; echo get_page_link($howto_id); ?>" target="blank"> <button class="tomb"> <i class="glyphicon glyphicon-share-alt"></i> <?php if ($t == 'id') {echo "Cara Pemesanan";} else {echo "How to Order";} ?> </button> </a> <?php } else if ($oketheme['metode_act'] == 'direct') { ?> <br/> <a href="<?php echo $oketheme['direct_url']; ?>" target="blank"> <button class="tomb"> <i class="glyphicon glyphicon-share-alt"></i> <?php if ($t == 'id') {echo "Cara Pemesanan";} else {echo "How to Order";} ?> </button> </a> <?php } else if ($oketheme['metode_act'] == 'directwa') { ?> <br/> <?php if ($t == 'id') {?> <a href="https://api.whatsapp.com/send?phone=<?php echo indowa($oketheme['direct_wa']); ?>&text=Halo, saya tertarik tentang <?php the_title(); ?> : <?php the_permalink(); ?>" target="blank"> <?php } else { ?> <a href="https://api.whatsapp.com/send?phone=<?php echo indowa($oketheme['direct_wa']); ?>&text=Hello, I need more info about <?php the_title(); ?> : <?php the_permalink(); ?>" target="blank"> <?php } ?> <button class="tomb"> <i class="glyphicon glyphicon-share-alt"></i> <?php if ($t == 'id') {echo "Pesan via Whatsapp";} else {echo "Order via Whatsapp";} ?> </button> </a> <?php } ?> <?php } get_template_part('share'); ?> </div> <div style="clear: both"></div> </div> </div> <div id="conwrap" style="padding-top:0;position:unset;overflow:unset"> <?php if ($t == 'id') { pesantour(); } else {pesantour_en(); };?> <div class="tabdetail"> <div id="tabs"> <ul> <?php if (get_the_content()) { echo '<li><a href="#deskripsi">'.($t=='id'?'Deskripsi':'Description').'</a></li>'; } if (rwmb_meta( 'itinerary' )) { echo '<li><a href="#itinerary">Itinerary</a></li>'; } if (rwmb_meta( 'term' )) { echo '<li><a href="#term">'.($t=='id'?'Syarat & Ketentuan':'Term & Condition').'</a></li>'; } if (rwmb_meta( 'ctabs_act' ) && rwmb_meta( 'ctabs' )) { echo '<li><a href="#ctabs">'.rwmb_meta( 'ctabs_title' ).'</a></li>'; } if ($oketheme['random_tour_act']) { echo '<li><a href="#tour-lain">'.($t=='id'?'Tour Lainnya':'Other Tour').'</a></li>'; } ?> </ul> <div id="deskripsi" class="wrap-post"> <?php the_content();?> </div> <div id="itinerary" class="wrap-post"> <?php echo rwmb_meta( 'itinerary' );?> </div> <div id="term" class="wrap-post"> <?php echo rwmb_meta( 'term' );?> </div> <div id="ctabs" class="wrap-post"> <?php echo rwmb_meta( 'ctabs' );?> </div> <div id="tour-lain"> <?php randomtour();?> </div> </div> </div> <?php edit_post_link('<button>Edit Tour</button>');?> </div> <?php endwhile; endif;?> <?php get_footer(); ?>