Skip to content

Use Virtual Tours Block

With the Virtual tours PLUS Gutenberg block (immomakler/single-virtual-tours) you embed virtual 360° tours of a property directly in block templates or any pages. Each recognised tour URL is rendered as an embedded <iframe>. The block matches the functionality and output of the Elementor widget of the same name, “Virtual tours”.

  • WordPress with the Gutenberg editor (WordPress 5.0 or later)
  • WP-ImmoMakler PLUS (the block is not available in the Basic edition)
  • The property must have a link with a recognised 360° tour URL stored
  1. Edit a property or open a template

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

  2. Insert the block

    Click the + icon and search for Virtual tours, or navigate to the Widgets category. Insert the block.

  3. Check the preview

    In the editor — provided at least one sample property with tour URLs is available — a live preview with the iFrames is displayed. If no tour URLs are present, a placeholder text appears.

In the block panel Virtual Tour you set the appearance:

OptionDescription
16:9 (landscape)Standard format for video content — recommended for most tours
3:2 (landscape)Wide landscape format, default for this block
4:3 (landscape)Classic screen format
1:1 (square)Square display

The configured value is applied as the aspect-ratio CSS property to both the block wrapper and the <iframe>. The content blocker overlay (e.g. Borlabs Cookie) also inherits the aspect ratio.

The corner radius is applied as border-radius to the <iframe>. The four corners can be set together or independently:

  • All sides equal: Enables a single input for all four corners simultaneously (default: on).
  • Individual sides: Turn off the toggle to set top, right, bottom and left separately.

Supported units: px, %, em, rem.

/* Block wrapper */
.wp-block-immomakler-single-virtual-tours { }
/* Embedded iframe */
.wp-block-immomakler-single-virtual-tours .immomakler-virtual-tour { }

The HTML of each individual <iframe> can be customised via the immomakler_virtual_tour_html filter — e.g. to insert a custom consent overlay:

add_filter(
'immomakler_virtual_tour_html',
function ( string $iframe_html, string $url, string $preview_image_url ): string {
// Return custom HTML, e.g. with a consent wrapper
return $iframe_html;
},
10,
3
);

The block displays all tour URLs that WP-ImmoMakler recognises as 360° tours. An overview of supported providers can be found under 360-Degree Tours.