$link = add_query_arg(array('location_id' => get_the_ID(), 'pick-up' => get_the_title()), get_the_permalink($page_search)); } else { //$link = home_url(esc_url('?s=&post_type=st_hotel&location_id='.get_the_ID())); //$link = home_url(esc_url('?s=&post_type=st_tours&location_id='.get_the_ID()."&pick-up=".get_the_title())); $link = add_query_arg(array('pick-up' => get_the_title(), 'location_id' => get_the_ID(), 's' => '', 'st_rental' => 'st_tours'), home_url('/')); } if ($offer > 1) { $offer_string = sprintf(__('%d Tour from %s', ST_TEXTDOMAIN), $offer, $min_price); } else { $offer_string = sprintf(__('%d Tours from %s', ST_TEXTDOMAIN), $offer, $min_price); } echo '<li><a href="' . $link . '"><i class="fa fa-bolt"></i> ' . $offer_string . '</a></li>'; } } $holiday = new STHoliday(); if ($holiday->is_available()) { $info = new STLocation(); $info = $info->get_info_by_post_type(get_the_ID(), 'st_holidays'); $min_price = $info['min_max_price']['price_min']; $min_price = TravelHelper::format_money($min_price); if (empty($min_price) or !$min_price) { $min_price = __("Free", ST_TEXTDOMAIN); } $offer = $info['offers']; if (!empty($offer)) { $page_search = st_get_page_search_result('st_holidays'); if (!empty($page_search) and get_post_type($page_search) == 'page') { //$link = add_query_arg(array('location_id'=>get_the_ID()),get_the_permalink($page_search)); $link = add_query_arg(array('location_id' => get_the_ID(), 'pick-up' => get_the_title()), get_the_permalink($page_search)); } else { //$link = home_url(esc_url('?s=&post_type=st_hotel&location_id='.get_the_ID()));
} else { //$link = home_url(esc_url('?s=&post_type=st_hotel&location_id='.get_the_ID())); //$link = home_url(esc_url('?s=&post_type=st_tours&location_id='.get_the_ID()."&pick-up=".get_the_title())); $link = add_query_arg(array('s' => '', 'post_type' => 'st_tours', 'location_id' => get_the_ID(), 'pick-up' => get_the_title()), home_url('/')); } if ($offer <= 1) { $offer_string = sprintf(__('%d Tour from %s', ST_TEXTDOMAIN), $offer, $min_price); } else { $offer_string = sprintf(__('%d Tours from %s', ST_TEXTDOMAIN), $offer, $min_price); } echo '<li><a href="' . $link . '"><i class="fa fa-bolt"></i> ' . $offer_string . '</a></li>'; } } } $holiday = new STHoliday(); if ($holiday->is_available() && TravelHelper::checkTableDuplicate('st_holidays')) { $info = new STLocation(); $info = $info->get_info_by_post_type(get_the_ID(), 'st_holidays'); $min_price = $info['min_max_price']['price_min']; $min_price = TravelHelper::format_money($min_price); if (empty($min_price) or !$min_price) { $min_price = __("Free", ST_TEXTDOMAIN); } if (is_array($info) && count($info)) { $offer = $info['offers']; if (!empty($offer)) { $page_search = st_get_page_search_result('st_holidays'); if (!empty($page_search) and get_post_type($page_search) == 'page') { //$link = add_query_arg(array('location_id'=>get_the_ID()),get_the_permalink($page_search)); $link = add_query_arg(array('location_id' => get_the_ID(), 'pick-up' => get_the_title()), get_the_permalink($page_search)); } else {