Featured image in Rooms detail page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #947237
    alessandro cirina
    Participant

    is possible to restore the featured image in the accomodation page details? Now is possible to see only if there isn’t images in gallery accomodation. I would like display ever one big image for the specific room. tnx

    #947703
    Andre Flores
    Moderator

    Hello, Alessandro!

    You may simply remove gallery in Accommodation Type editing page and set the Featured Image: https://prnt.sc/s7g493. Once it is done, the featured image will be displayed instead of the gallery.

    Regards,
    Andre

    #947706
    alessandro cirina
    Participant

    this functionality was already known. I’d like both. both featured image and gallery together.

    #948113
    Andre Flores
    Moderator

    Hi, Alessandro!

    There is a condition in theme files to load gallery only, if it exists in accommodation type settings, otherwise the featured image should be loaded. The code is located in content-mphb_room_type.php file under /wp-content/themes/booklium/template-parts/ directory:

    <?php
    	if ( $has_gallery ) {
            do_action('booklium_render_single_room_gallery');
    	} else {
    		booklium_post_thumbnail( 'booklium-large' );
    	}
    	?>

    You may overwrite it by adding the following code to the child theme:

    <?php
    	if ( $has_gallery ) {
                    do_action('booklium_render_single_room_gallery');
    		booklium_post_thumbnail( 'booklium-large' );
            
    		
    	}
    	?>

    Best regards,
    Andre

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