Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Featured image and gallery images
- This topic has 3 replies, 2 voices, and was last updated 3 years, 5 months ago by
Andre Flores.
- AuthorPosts
- March 6, 2021 at 9:27 am #1085659
Jonas Bühler
ParticipantDear 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
JonasMarch 10, 2021 at 11:48 pm #1087917Andre Flores
ModeratorHello 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,
AndreMarch 27, 2021 at 4:19 am #1096063Jonas Bühler
ParticipantHi Andre
Thanks! This helped a lot!
Best wishes
JonasMarch 30, 2021 at 12:02 am #1097265Andre Flores
ModeratorHello 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 - AuthorPosts
- You must be logged in to reply to this topic.