Free and Premium WordPress Plugins & Themes Forums WordPress Themes Booklium Booklium theme search results gallery
- This topic has 3 replies, 2 voices, and was last updated 3 years, 9 months ago by Andre Flores.
- AuthorPosts
- January 31, 2021 at 3:32 pm #1067366Maria RoncaratiParticipant
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.
February 3, 2021 at 12:40 am #1068834Andre FloresModeratorHello 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,
AndreFebruary 18, 2021 at 7:40 pm #1077090Maria RoncaratiParticipantHi 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!
February 18, 2021 at 11:54 pm #1077141Andre FloresModeratorHello 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 - AuthorPosts
- You must be logged in to reply to this topic.