BYT_Theme_Utils::breadcrumbs(); get_sidebar('under-header'); global $post, $byt_theme_globals, $tour_date_from, $current_user, $tour_obj, $entity_obj, $default_tour_tabs, $score_out_of_10, $byt_tours_post_type, $byt_theme_of_custom; $enable_reviews = $byt_theme_globals->enable_reviews(); $enable_tours = $byt_theme_globals->enable_tours(); $price_decimal_places = $byt_theme_globals->get_price_decimal_places(); $tour_extra_fields = $byt_theme_globals->get_tour_extra_fields(); $tab_array = $byt_theme_globals->get_tour_tabs(); $price_decimal_places = $byt_theme_globals->get_price_decimal_places(); $default_currency_symbol = $byt_theme_globals->get_default_currency_symbol(); $show_currency_symbol_after = $byt_theme_globals->show_currency_symbol_after(); if (have_posts()) { the_post(); $tour_obj = new byt_tour($post); $entity_obj = $tour_obj; $tour_map_code = $tour_obj->get_custom_field('map_code'); $tour_location = $tour_obj->get_location(); $tour_location_title = ''; if ($tour_location) { $tour_location_title = $tour_location->get_title(); } $tour_is_reservation_only = $tour_obj->get_is_reservation_only(); $tour_date_from = date('Y-m-d', strtotime("+0 day", time())); $tour_date_from_year = date('Y', strtotime("+0 day", time())); $tour_date_from_month = date('n', strtotime("+0 day", time())); ?> <script> window.postType = 'tour'; </script> <?php if ($enable_reviews) {
global $post, $tour_class, $display_mode, $byt_theme_globals, $byt_tours_post_type, $byt_reviews_post_type; $tour_id = $post->ID; $tour_obj = new byt_tour($post); $base_id = $tour_obj->get_base_id(); $reviews_total = $byt_reviews_post_type->get_reviews_count($base_id); $price_decimal_places = $byt_theme_globals->get_price_decimal_places(); $default_currency_symbol = $byt_theme_globals->get_default_currency_symbol(); $show_currency_symbol_after = $byt_theme_globals->show_currency_symbol_after(); $tour_image = $tour_obj->get_main_image(); if (empty($tour_image)) { $tour_image = BYT_Theme_Utils::get_file_uri('/images/uploads/img.jpg'); } $is_price_per_group = $tour_obj->get_is_price_per_group(); $score_out_of_10 = 0; if ($reviews_total > 0) { $review_score = $tour_obj->get_custom_field('review_score', false); $score_out_of_10 = round($review_score * 10); } $tour_description_html = BYT_Theme_Utils::strip_tags_and_shorten($tour_obj->get_description(), 100) . '<a href="' . $tour_obj->get_permalink() . '">' . __('More info', 'bookyourtravel') . '</a>'; $current_date = date('Y-m-d', time()); $tour_min_price = $byt_tours_post_type->get_tour_min_price($tour_id, $current_date); $tour_location = $tour_obj->get_location(); $tour_location_title = ''; if ($tour_location) { $tour_location_title = $tour_location->get_title(); } if (empty($display_mode) || $display_mode == 'card') { ?> <!--tour item--> <article class="tour_item <?php echo $tour_class;