<div class="rating"><?php echo ct_rating_smiles($review_detail[$i]); ?> </div> </li> <?php } ?> </ul> </div> </div><!-- End row --> <hr> <div class="guest-reviews"> <?php $per_page = 10; $review_count = ct_get_review_html($post_id, 0, $per_page); ?> </div> <?php if ($review_count >= $per_page) { ?> <a href="#" class="btn more-review" data-post_id="<?php echo esc_attr($post_id); ?> "><?php echo esc_html__('LOAD MORE REVIEWS', 'citytours'); ?> </a> <?php } ?>
function ct_ajax_get_more_reviews() { if (empty($_POST['post_id']) || $_POST['last_no']) { return false; } $post_id = sanitize_text_field($_POST['post_id']); $last_no = sanitize_text_field($_POST['last_no']); $per_page = 10; $review_count = ct_get_review_html($post_id, $last_no, $per_page); exit; }