Made in Europe, buy from Europe.

Black Friday

65% off Annual plans

25% off Lifetime · 10 per week

Ends December 2

Get the deal →

How to add Modula galleries to WordPress posts and pages

Updated 3 min read

You can add Modula galleries to any WordPress page or post. Use the Modula Gallery block, the gallery’s shortcode, or the Modula module of your page builder. If your gallery isn’t ready yet, start with Create your first gallery.

Watch how to copy a gallery’s shortcode and add the gallery to a page with the Modula Gallery block or a Shortcode block.

Get the gallery’s shortcode

A shortcode is a short piece of text that WordPress swaps for your gallery. Every gallery has one with its ID, like [modula id="89"]. You can copy it from two places:

  • In the gallery editor, click Embed at the top right. Then click Copy next to Shortcode.

    Embed this gallery with the shortcode, the PHP line and the Modula Link shortcode, each with Copy
  • In Modula → Galleries, click the copy icon next to the gallery in the Shortcode column.

    The gallery list with the Shortcode column and its copy buttons

Embed also gives you other codes:

  • PHP (theme templates): A line for a theme file, such as <?php echo do_shortcode( '[modula id="89"]' ); ?>.
  • Modula Link (opens the gallery in a lightbox): [modula-link id="89"]View the gallery[/modula-link] shows a text link instead of the gallery. A lightbox is a pop-up that shows images over the page. This needs Modula Pro. See Modula Link.

Albums work the same way with [modula-album id="…"]. Their shortcodes are in the Albums tab. See Modula Albums.

Add a gallery in the block editor

With the block editor you don’t need the shortcode at all, because the block lets you pick the gallery from a list.

  1. Edit the page or post.
  2. Click the + (block inserter) and search for Modula Gallery.

    Adding the Modula Gallery block from the block inserter
  3. In the block, click Display An Existing Gallery.
  4. Type in Search for a gallery… and pick your gallery. The block shows a preview of it.

    The Modula Gallery block with Search for a gallery… and the list of galleries
  5. Save or publish the page.

To change the gallery later, use Edit gallery in the block toolbar. It opens the gallery in a new tab.

With Modula Pro you also get a Modula Albums block for albums and a Modula Link block.

Add a gallery with the shortcode

The shortcode works in any editor, theme or page builder.

  1. Copy the shortcode.
  2. Open the page or post.
  3. Paste the shortcode where the gallery should appear. In the block editor, paste it into a Shortcode block.

    A Modula shortcode pasted into a Shortcode block
  4. Save the page or post.

Add a gallery in page builders and widgets

Page builders can show your galleries too. Some have their own Modula element, and the others use the shortcode.

  • Elementor: Use the Modula widget (and Modula Albums with Pro). See Modula and Elementor.
  • Beaver Builder: Use the Modula Gallery module. See Modula and Beaver Builder.
  • Divi: Use the Modula Gallery module and pick the gallery in its settings. See Modula and Divi.
  • SiteOrigin Page Builder: See Inserting Modula galleries into SiteOrigin.
  • WPBakery: Edit the page with WPBakery and click Add Element. Add a Text Block and paste the shortcode into it.
  • Oxygen: Click + Add. Add a Shortcode element and paste the shortcode into it.
  • Any other builder: Use its shortcode, text or HTML element and paste the shortcode.
  • Widget areas: With block widgets, add the Modula Gallery block. With classic widgets, add the Modula Gallery widget in Appearance → Widgets.
Was this page helpful?
0 0

Still stuck?

Can’t find the answer?

Write to us with what you tried and what you expected to happen, and we’ll help you sort it out.