function gdlr_get_modern_room_carousel($query, $size, $thumbnail_size) { $ret = ''; $ret .= '<div class="gdlr-room-carousel-item gdlr-item" >'; $ret .= '<div class="flexslider" data-type="carousel" data-nav-container="room-item-wrapper" data-columns="' . $size . '" >'; $ret .= '<ul class="slides" >'; while ($query->have_posts()) { $query->the_post(); $post_option = json_decode(gdlr_decode_preventslashes(get_post_meta(get_the_ID(), 'post-option', true)), true); $ret .= '<li class="gdlr-item gdlr-modern-room">'; $ret .= '<div class="gdlr-room-thumbnail">' . gdlr_get_room_thumbnail($post_option, $thumbnail_size) . '</div>'; $ret .= '<h3 class="gdlr-room-title"><a href="' . get_permalink() . '" >' . get_the_title() . '</a></h3>'; $ret .= '<a href="' . get_permalink() . '" class="gdlr-room-detail">' . __('Check Details', 'gdlr-hotel') . '<i class="fa fa-long-arrow-right icon-long-arrow-right"></i></a>'; $ret .= '</li>'; // gdlr-item } $ret .= '</ul>'; $ret .= '<div class="clear"></div>'; $ret .= '</div>'; // close the flexslider $ret .= '</div>'; // close the gdlr-item wp_reset_postdata(); return $ret; }
function gdlr_get_booking_room($query, $data) { global $hotel_option; global $gdlr_excerpt_length, $gdlr_excerpt_read_more; $gdlr_excerpt_read_more = false; $gdlr_excerpt_length = $hotel_option['booking-num-excerpt']; add_filter('excerpt_length', 'gdlr_set_excerpt_length'); $ret = '<div class="gdlr-booking-room-wrapper" >'; while ($query->have_posts()) { $query->the_post(); $post_option = json_decode(gdlr_decode_preventslashes(get_post_meta(get_the_ID(), 'post-option', true)), true); $post_option['data'] = $data; $ret .= '<div class="gdlr-item gdlr-room-item gdlr-medium-room">'; $ret .= '<div class="gdlr-ux gdlr-medium-room-ux">'; $ret .= '<div class="gdlr-room-thumbnail">' . gdlr_get_room_thumbnail($post_option, $hotel_option['booking-thumbnail-size']) . '</div>'; $ret .= '<div class="gdlr-room-content-wrapper">'; $ret .= '<h3 class="gdlr-room-title"><a href="' . get_permalink() . '" >' . get_the_title() . '</a></h3>'; if (!empty($hotel_option['enable-hotel-branch']) && $hotel_option['enable-hotel-branch'] == 'enable') { $terms = get_the_terms(get_the_ID(), 'room_category'); $ret .= '<div class="gdlr-room-hotel-branches">'; foreach ($terms as $term) { $ret .= '<span class="gdlr-separator">,</span>' . $term->name; } $ret .= '</div>'; } $ret .= gdlr_hotel_room_info($post_option, array('bed', 'max-people', 'view')); $ret .= '<div class="gdlr-room-content">' . get_the_excerpt() . '</div>'; $ret .= '<a class="gdlr-room-selection gdlr-button with-border" href="#" '; $ret .= 'data-roomid="' . get_the_ID() . '" >' . __('Select this room', 'gdlr-hotel') . '</a>'; $ret .= gdlr_hotel_room_info($post_option, array('price-break-down'), false); $ret .= '<div class="clear"></div>'; $ret .= '</div>'; $ret .= '<div class="clear"></div>'; $ret .= '</div>'; // gdlr-ux $ret .= '</div>'; // gdlr-item } $ret .= '<div class="clear"></div>'; $ret .= '</div>'; wp_reset_postdata(); $gdlr_excerpt_read_more = true; remove_filter('excerpt_length', 'gdlr_set_excerpt_length'); return $ret; }
<div class="gdlr-item gdlr-item-start-content"> <div id="room-<?php the_ID(); ?> " <?php post_class(); ?> > <?php echo gdlrs_get_reservation_bar(true); ?> <div class="gdlr-room-main-content"> <div class="gdlr-room-thumbnail gdlr-single-room-thumbnail"> <?php echo gdlr_get_room_thumbnail($gdlr_post_option, $hostel_option['room-thumbnail-size']); echo gdlr_get_room_thumbnail_control($gdlr_post_option); ?> </div> <div class="gdlr-room-title-wrapper"> <h3 class="gdlr-room-title"><?php echo get_the_title(); ?> </h3> <?php echo gdlr_hostel_room_info($gdlr_post_option, array('price'), false); ?> <div class="clear"></div> </div> <?php echo gdlr_hostel_room_info($gdlr_post_option);