Booklium theme search results gallery

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1067366
    Maria Roncarati
    Participant

    How to disable the gallery in the search results page????

    I just want the featured image in the thumbnail, because the page take a lot of time to read the galleries of each accomodation.

    #1068834
    Andre Flores
    Moderator

    Hello Maria,

    In order to get rid of the gallery on the Search Results page and leave the featured image only locate the room-content.php file under /wp-content/themes/booklium/hotel-booking/shortcodes/search-results/ directory, open the file for editing and find the following code there approximately on lines 37-48:

    if ( $isShowGallery && mphb_tmpl_has_room_type_gallery() ) {
    				?>
                    <div class="loop-room-images-wrapper">
    					<?php
    					/**
    					 * @hooked \MPHB\Views\LoopRoomTypeView::renderGallery - 10
    					 */
    					do_action( 'mphb_sc_search_results_render_gallery' );
    					?>
                    </div>
    				<?php
    			} else if ( $isShowImage && has_post_thumbnail() ) {

    Replace the code with the following:

    if ( $isShowImage && has_post_thumbnail() ) {

    Regards,
    Andre

    #1077090
    Maria Roncarati
    Participant

    Hi Andre, I try what you say but is not working. Can you please be more explicit??

    this is what I replace:
    I change this: if ( $isShowImage && has_post_thumbnail() ) {
    for just this: if ( $isShowGallery && mphb_tmpl_has_room_type_gallery() ) {

    Do I need to remove the all code from the lines 37 to the 48 ???

    Thanks!

    #1077141
    Andre Flores
    Moderator

    Hello Maria,

    You should remove the following code on lines 37-48 (lines may be slightly different):

    if ( $isShowGallery && mphb_tmpl_has_room_type_gallery() ) {
    				?>
                    <div class="loop-room-images-wrapper">
    					<?php
    					/**
    					 * @hooked \MPHB\Views\LoopRoomTypeView::renderGallery - 10
    					 */
    					do_action( 'mphb_sc_search_results_render_gallery' );
    					?>
                    </div>
    				<?php
    			} else if ( $isShowImage && has_post_thumbnail() ) {

    And add the following code instead:

    if ( $isShowImage && has_post_thumbnail() ) {

    Make sure to back-up the the room-content.php file before performing any changes to it.

    Regards,
    Andre

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.