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); ?> <div class="gdlr-room-content"><?php the_content(); ?> </div> </div> </div><!-- #room --> <?php // ?> <div class="clear"></div> </div> </div>
function gdlrs_get_classic_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-classic-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 .= '<div class="gdlr-hotel-room-info">'; $ret .= gdlr_hostel_room_info($post_option, array('bed', 'max-people', 'view', 'room-size'), false); $ret .= gdlr_hostel_room_info($post_option, array('price'), false); $ret .= '<div class="clear"></div></div>'; $ret .= '<a class="gdlr-button with-border" href="' . get_permalink() . '">' . __('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 gdlrs_get_booking_room($query, $data) { global $hostel_option; global $gdlr_excerpt_length, $gdlr_excerpt_read_more; $gdlr_excerpt_read_more = false; $gdlr_excerpt_length = $hostel_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, $hostel_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($hostel_option['enable-hotel-branch']) && $hostel_option['enable-hotel-branch'] == 'enable') { $terms = get_the_terms(get_the_ID(), 'hostel_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_hostel_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_hostel_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; }