Skip to content

Gallery Block

With the Gutenberg block Property Gallery (immomakler/gallery) you embed only the image gallery of a property — independently of the full detail view. The block offers the same layout and design options as the Customizer gallery, but sets them per block instance. This way, different pages can show galleries styled differently.

Property Gallery on the frontend: large main image with four thumbnails below
  • WordPress with the Gutenberg editor (from WordPress 5.0)
  • WP-ImmoMakler (any edition)
  1. Edit a property or create a template

    Open an existing property in the editor or create a block-based template for the Property post type (requires a block theme or the Site Editor).

  2. Insert the block

    Click the + symbol and search for Property Gallery, or navigate to the Widgets category. Insert the block.

  3. Choose the image source

    In the Property side panel, set which property the images come from (see the next section).

  4. Configure the gallery

    Adjust layout, slideshow or static options, aspect ratios, sizes, and design in the side panels. The editor preview updates live.

  5. Save and publish

    Save or update the page. The gallery is now available on the frontend.

The Property panel determines which images the block displays.

OptionDescription
Source → Current property (loop)The block shows the images of the property in whose context it is rendered — for example in the template for the Property post type or within a query loop (default).
Source → Manual selectionYou select a specific property. A selection field appears in which you search by the property title or the external property ID (objektnr_extern).
Image selectionRestricts which images are shown: All images, Floor plans only, or Without floor plans.
Block side panel Property with source dropdown and image selection

In the Gallery type & layout panel you choose between two basic display modes:

Gallery typeDescription
Slideshow (Swiper)Interactive slideshow with a thumbnail bar, carousel and autoplay options. For details on the layouts, see Image gallery: Slideshow.
Static (grid)Static grid of a main image and thumbnails, opened via lightbox. For details on the layouts, see Image gallery: Static image.

Depending on the chosen gallery type, the matching layout options appear, along with the Slideshow options or Static options panel.

The block bundles all options in the following side panels. The meaning of the individual options is identical to the Customizer gallery — the linked pages describe them in detail.

PanelControlsDetails
PropertyImage source and image selection(see above)
Gallery type & layoutSlideshow vs. static and the layoutSlideshow · Static
Slideshow optionsAutoplay, transition effect and duration, arrow buttons, thumbnails on mobile devicesSlideshow
Static optionsAspect mode, behaviour with image overflow, hover animation, number of thumbnailsStatic
Grid (static layout)All images as equally sized tiles without a main image: columns (maximum), minimum tile width, tile aspect ratio, image fit (Crop or Show in full) and image title as caption. Combined with the “floor plans only” image selection, this produces a floor plans box like the WP-ImmoMakler skin’sStatic
Mosaic (static layout)Blocks of four photos each with two large and two small tiles, mirrored from block to block, without a main image: block aspect ratio, row height distribution and limit number of images. Replaces the former Photo Gallery “Grid” blockStatic
Aspect ratiosAspect ratio of the main and thumbnail imagesSlideshow
SizesHeight of the thumbnail bar, width of the thumbnail column, carousel or fixed gallery heightSlideshow
Spacing & cornersSpacing between thumbnails, spacing between main images, corner rounding, colour of the arrow buttonsSlideshow
Block selected in the editor with the side panels open on the right

The Gutenberg editor shows a server-side rendered live preview of the gallery directly in the editor. To check the final result:

  1. Save or publish the page.
  2. Open the page on the frontend.
  3. Check the slideshow navigation or lightbox and the display on mobile devices.

The block uses the same gallery library as the detail page. Its behaviour can be customised via filter hooks and CSS variables — see Gallery library: Customising. Outside the block editor, the gallery shortcode is also available.