# Guide to using iframes

## This guide has a more up-to-date version

⚠️ **This guide is outdated.** The admin now generates the shortcode and the iFrame code for each product from the **"Embed code"** modal, and some details on this page have changed (for example, for individual rental products the `product_type` parameter is no longer required). See the updated guides:

- [How to embed your Lueira activities in your WordPress website](lueira-guide:ff98c105-46ce-4d3a-9d20-68f25d2d9b29?locale=en): step-by-step guide using the modal.
- [Lueira Embed plugin: technical reference](lueira-guide:fcddf4c7-bb2c-4d74-ba23-f7c8f6b30999?locale=en): all the shortcode parameters, URLs, CSS and requirements.

💡 The iFrame does not require your website to be WordPress: you can paste it into any website that lets you insert HTML.

## Guide to using iframes

The Lueira platform lets you add iframes to your own website so you don't have to redirect customers to the Lueira online store and they don't have to leave your website. This lets you keep the SEO of your own website.

​

It is important that your website is built with WordPress. Lueira Embed makes it easy to add Lueira marketplace activities inside your WordPress posts and pages using a Shortcode. The plugin adds a button that opens a tab containing an iframe with the embedded activity.

![](https://media.support.lueira.com/images/e72387510542b4bc056f5aa4af4b0d21.png)

**The main features of this option:**

- **Easy integration:** embed Lueira activities with a Shortcode, with no technical knowledge needed.
- **Responsive design:** the modal automatically adapts to any device.
- **Accessible and secure:** it complies with ARIA standards and uses a protected (*sandboxed*) iframe.
- **Customizable:** you can change the button text and apply your own styles.
- **Simple setup:** it includes language options and settings from the WordPress panel.

**How to install it on WordPress:**

1. Upload the files to the `/wp-content/plugins/lueira/` folder.
2. Activate the plugin from the **Plugins** menu in your WordPress panel.
3. (Optional) Go to **Settings > Lueira Embed** to set the **URL of your center in Lueira**.

**Iframe configuration instructions:**

- **Administrator settings** Go to **Settings > Lueira Embed** in the WordPress panel to configure: **Host URL:** the base address of the Lueira marketplace (default: [https://store.lueira.com](https://store.lueira.com/))

**Usage: basic Shortcode**

[lueira id="cd2j3bkk7mdnur3r857g" module="school" product_type="private"]

**Shortcode parameters**

| **Parameter** | **Required** | **Default** | **Description** |
| --- | --- | --- | --- |
| `id` | Yes | - | The ID of the activity to embed |
| `module` | Yes | - | The module type (for example, "school", "rent") |
| `product_type` | Yes, except for individual rental products | - | The product type (for example, "private", "group" and "group-package" for school; "product" and "bundle" for rental) |
| `lang` | No | "es" | The language code used to display the localized content (default: "es") |
| `button_text` | No | "View activity" | The text shown on the button |
| `class` | No | - | Additional CSS classes for the button |

- **Examples** School activity (private): [lueira id="456" module="school" product_type="private" button_text="View Activity"] ![](https://media.support.lueira.com/images/82664d1e7ec4d4da2b4b11e35566cb7c.png)
  ![](https://media.support.lueira.com/images/dee23467b87c1d5d2289f92bce8409c0.png)
- Rafting group pack: [lueira id="789" module="school" product_type="group-package" lang="es" class="btn-primary" button_text="View Activity"] ![](https://media.support.lueira.com/images/82664d1e7ec4d4da2b4b11e35566cb7c.png) ![](https://media.support.lueira.com/images/806b701503a055aa40352f625177fbe2.png)

- **Structure of the generated URL**
  The plugin generates URLs in the following format: {host_url}/{lang}/embed/{module}/{product_type}/{activity_id} For example: [https://store.lueira.com/es/embed/rent/bundle/456](https://store.lueira.com/es/embed/rent/bundle/456)
- [https://store.lueira.com/en/embed/school/private/123](https://store.lueira.com/en/embed/school/private/123)

**Styles**

The plugin includes default CSS styles for the modal and the button. You can customize their appearance in the following ways:

- Adding custom CSS classes through the `class` parameter.
- Overriding the plugin styles from your theme.
- Directly editing the included `modal.css` file.

**CSS classes**

- `.lueira-embed-button-wrapper` - Button container
- `.lueira-embed-trigger` - Button that opens the modal
- `.lueira-embed` - Main modal container
- `.lueira-embed__backdrop` - Modal background or overlay
- `.lueira-embed__dialog` - Modal dialog box
- `.lueira-embed__close` - Button to close the modal

**Compatibility**

- Modern browsers: Chrome, Firefox, Safari and Edge.
- Mobile-friendly (responsive) design.
- Accessibility compliance with ARIA attributes.

**Security settings**

The embedded iframe includes the following *sandbox* security attributes:

`allow-same-origin`

`allow-scripts`

`allow-popups`

`allow-forms`

`allow-top-navigation-by-user-activation`

**Requirements**

- WordPress 5.0 or later
- PHP 7.4 or later

- **Version 1.0.0** Shortcode implementation with an overlay modal
- Settings page in the administrator
- Responsive design
- Multi-language support
- Iframe with security sandbox

If you have any questions about how to set up iframes on your website, don't hesitate to contact us!

Source: https://help.lueira.com/en/articles/guia-de-uso-de-iframes
