Featured image and gallery images

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1085659
    Jonas Bühler
    Participant

    Dear MotoPress team

    I use the Hotel Booking plugin on the Twenty Seventeen theme and would like to change how the featured image and gallery are shown on the search results/accomodations page and single accomodation type pages.

    Specifically, I would like to display the featured image as a kind of thumbnail on the left side of the text on the search results and accomodations pages. On these pages, I do not want to display the gallery.

    On the accomodation type pages, however, I would like do display the gallery right at the top, where the features image is now.

    Any tips?

    Best wishes
    Jonas

    #1087917
    Andre Flores
    Moderator

    Hello Jonas,

    In order to get rid of the gallery on Search Results page copy the room-content.php file from /wp-content/plugins/motopress-hotel-booking/templates/shortcodes/search-results/ directory to /wp-content/themes/twenty-seventeen/hotel-booking/shortcodes/search-results/ directory.
    Once the file is copied open it for editing and locate the following code 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 it with the following:

    if ( $isShowImage && has_post_thumbnail() ) {

    As for the single accommodation type pages, you may find detailed directions on how to override its content in this article.

    Regards,
    Andre

    #1096063
    Jonas Bühler
    Participant

    Hi Andre

    Thanks! This helped a lot!

    Best wishes
    Jonas

    #1097265
    Andre Flores
    Moderator

    Hello Jonas,

    You are most welcome.
    It would be very much appreciated of you leave your positive feedback about the Hotel Booking plugin at: https://motopress.com/products/hotel-booking/#edd-reviews-respond.

    Thank you in advance!

    Regards,
    Andre

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