Create Beautiful Responsive Photo & Video Galleries For Your Site in Minutes

Envira Gallery Documentation

Documentation, Reference Materials and Tutorials for Envira Gallery

How to add an Envira gallery to a Divi page

Envira Gallery works with the Divi Builder. You build the gallery once in Envira, then drop it onto any Divi layout with a shortcode. Your layout, columns, lightbox, and every other gallery setting travel with the gallery, so you set them in one place and the Divi page picks them up.

There is no separate Divi addon to buy or install. The method below works in every Envira Gallery version, including Envira Gallery Lite.

Before you start

  • Envira Gallery installed and activated, any version.
  • At least one published gallery. If you have not made one yet, see How to create your first gallery.
  • The Divi theme or the Divi Builder plugin, Divi 4 or Divi 5.

Add a gallery with the Divi Builder

Step 1: Copy the gallery shortcode

Go to Envira Gallery › Galleries in your WordPress admin. Each gallery in the list has a Shortcode column. Click the clipboard icon next to your gallery to copy its shortcode.

The shortcode looks like this, where 123 is your gallery ID:

[envira-gallery id="123"]
Thumbnail for 'Spring Collection' gallery showing a coastal boardwalk with blue sky and rocks by the water, used in the admin list view under Shortcode.

Step 2: Edit the page with Divi

Open the page or post where you want the gallery, then click Enable Visual Builder.

Step 3: Add a Text module

Click the grey plus icon to add a new module, search for Text, and select it. A Code module works exactly the same way if you prefer to keep the shortcode out of the visual editor.

Overlay modal titled 'Insert Module' with 'New Module' tab active; includes a text input, a 'Text' tile with a red arrow pointing to it, and a blue button 'Explore More Divi Modules' on a landscape background.

Step 4: Paste the shortcode

Paste the shortcode into the module’s content area, on its own line with no other text around it. Then click the green checkmark to save the module.

Step 5: Save the page

Click Save in the Divi Builder toolbar, then view the page. Your gallery appears where you placed the module.

Using the Envira Gallery widget instead

Envira ships a classic Envira Gallery widget, and Divi can display it, but only as part of a whole widget area rather than on its own. Use this route only if you already have a sidebar built around the gallery. The shortcode is simpler for everything else.

  1. Go to Appearance › Widgets and add the Envira Gallery widget to a widget area. On WordPress 5.8 and later you will find it under Legacy Widget in the block based widgets screen.
  2. Pick your gallery in the widget settings and save.
  3. In Divi, add a Sidebar module and choose that widget area under Content › Widget Area.

Divi renders the whole area, so anything else sitting in that sidebar shows up alongside the gallery.

Shortcode options

The gallery shortcode accepts a small set of attributes:

AttributeExampleWhat it does
idid=”123″The gallery to display. This is the only attribute you need.
slugslug=”summer-2026″Displays a gallery by its slug instead of its ID.
limitlimit=”6″Shows only the first few images. This also turns caching off for that gallery.
cachecache=”false”Renders the gallery fresh on every page load, useful while you are testing a layout.

Layout, columns, and lightbox are not shortcode options. Adding columns="4" or layout="masonry" to the shortcode does nothing, because the gallery reads those from its own settings. Change them in Envira Gallery › Galleries on the gallery’s Config tab, and every page using that gallery updates at once.

Troubleshooting

The gallery is blank in the builder but fine on the live page

Divi’s older Backend Builder runs inside the WordPress admin, where Envira does not render galleries. Switch to the Visual Builder, or save the page and preview it.

The page shows the shortcode as plain text

The shortcode landed in a module that does not process shortcodes, or a character changed when it was pasted. Delete it, paste it again into a Text or Code module, and check that the square brackets and straight quotes survived.

You changed the gallery but the Divi page still shows the old version

Envira caches gallery output. Re-save the gallery, then clear any caching plugin or host cache. To rule caching out while you work, add cache="false" to the shortcode and remove it when you are done.

Frequently asked questions

Is there an Envira Divi addon?

No. We do not have a Divi module, and the shortcode above is the supported way to place a gallery in a Divi layout. If a Divi module is something you would use, tell our support team so we can log the request.

Do I need Envira Gallery Pro for this?

No. The shortcode and the widget both ship in Envira Gallery Lite.

Can one Divi page show different columns than another?

Not from the shortcode. Duplicate the gallery, give the copy its own column setting, then use each gallery’s own shortcode.

Related articles: How to create your first gallery · How to use the Envira Gallery widget

The Best Drag and Drop WordPress Gallery Plugin

Envira Gallery: Create, Showcase, and Sell Your Work – Trusted by 150k+ Sites.

Enter the URL of your WordPress website to install

Upgrade to Envira Gallery Pro

Unlock even more powerful features designed to make your galleries even more beaituful.

Video Galleries

eCommerce

Social media Sharing

Adobe Lightroom

And much more!

Copyright © [#this year :%Y] Envira Gallery, LLC. Envira Gallery is a trademark of Envira Gallery, LLC.