B
<?php
global $post, $accommodation_price, $date_from, $date_to,
$price_decimal_places, $default_currency_symbol,
$show_currency_symbol_after, $current_user,
$accommodation_obj, $score_out_of_10, $tour_obj, $cruise_obj,
$bookyourtravel_review_helper, $bookyourtravel_theme_globals;
$enable_reviews = $bookyourtravel_theme_globals->enable_reviews();
if (!empty($accommodation_obj)) {
$accommodation_location = $accommodation_obj->get_location();
$poly_object = $accommodation_obj;
}
else if(!empty($cruise_obj)){
$poly_object = $cruise_obj;
}
else if(!empty($tour_obj)) {
$poly_object = $tour_obj;
}
?>
<?php if ($enable_reviews) { ?>
<div>
<?php
$all_reviews_query = $bookyourtravel_review_helper->list_reviews($poly_object->get_base_id());
if ($all_reviews_query->have_posts()) {
while ($all_reviews_query->have_posts()) {
$all_reviews_query->the_post();
global $post;
$likes = get_post_meta($post->ID, 'review_likes', true);
$author = get_the_author();
?>
<!--testimonials-->
<article class="testimonials">
<blockquote><?php echo $likes; ?></blockquote>
<span class="name"><?php echo $author; ?></span>
</article>
<!--//testimonials-->
<?php break; } } ?>
</div>
<?php } //