$page_search = st_get_page_search_result('st_tours'); if (!empty($page_search)) { $link = add_query_arg(array('location_id' => get_the_ID()), get_the_permalink($page_search)); } else { $link = home_url(esc_url('?s=&post_type=st_tours&location_id=' . get_the_ID())); } if ($offer < 2) { $offer = $offer . " " . __("Tour from", ST_TEXTDOMAIN); } else { $offer = $offer . " " . __("Tours from", ST_TEXTDOMAIN); } echo '<li><a href="' . $link . '"><i class="fa fa-bolt"></i> ' . $offer . ' ' . $min_price . '</a></li>'; } } $activity = new STActivity(); if ($activity->is_available()) { $min_price = get_post_meta(get_the_ID(), 'min_price_st_activity', true); $min_price = TravelHelper::format_money($min_price); $offer = get_post_meta(get_the_ID(), 'offer_st_activity', true); if (!empty($offer)) { $page_search = st_get_page_search_result('st_activity'); if (!empty($page_search)) { $link = add_query_arg(array('location_id' => get_the_ID()), get_the_permalink($page_search)); } else { $link = home_url(esc_url('?s=&post_type=st_activity&location_id=' . get_the_ID())); } if ($offer < 2) { $offer = $offer . " " . __("Activity this Week", ST_TEXTDOMAIN); } else { $offer = $offer . " " . __("Activities this Week", ST_TEXTDOMAIN); }
} 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_holidays&location_id='.get_the_ID()."&pick-up=".get_the_title())); $link = add_query_arg(array('s' => '', 'post_type' => 'st_holidays', 'location_id' => get_the_ID(), 'pick-up' => get_the_title()), home_url('/')); } if ($offer <= 1) { $offer_string = sprintf(__('%d Holiday from %s', ST_TEXTDOMAIN), $offer, $min_price); } else { $offer_string = sprintf(__('%d Holidays from %s', ST_TEXTDOMAIN), $offer, $min_price); } echo '<li><a href="' . $link . '"><i class="fa fa-bolt"></i> ' . $offer_string . '</a></li>'; } } } $activity = new STActivity(); if ($activity->is_available() && TravelHelper::checkTableDuplicate('st_activity')) { $info = new STLocation(); $info = $info->get_info_by_post_type(get_the_ID(), 'st_activity'); $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_activity'); 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 {