Early Black Friday: Divi Doctor Lifetime for $129 (unlimited sites). Ends Cyber Monday. 14-day money-back guarantee.

Gallery slider captions and custom field images

Divi 5’s Gallery module never shows image titles and captions in its slider layout, and it only shows images you pick by hand. Divi Doctor adds two features: titles and captions under each slide, and a Gallery that takes its images from a custom field, so each post can show its own. This page covers both, their options and their limits.

Captions under a Gallery slider, and a Gallery in a post template that shows each post’s own images from a custom field.

Switch the features on

There are two separate switches. Use one or both.

  1. Go to Divi Doctor → Features and scroll to Gallery module.
  2. For slider captions, click Enable on the Captions in the slider layout card.
  3. For images from a custom field, click Enable on the Gallery images from a custom field card.
  4. If your site uses a page cache, clear it.

Captions in the slider layout

In the grid layout, Divi shows each image’s title and caption. In the slider layout it doesn’t, even though the builder still offers Show Title And Caption and the Title Text and Caption Text design options. With the feature on, those options work for sliders too. There’s nothing new to set.

  1. Open the Gallery module’s settings.
  2. In Design → Layout, set Layout to Slider.
  3. In Content → Elements, make sure Show Title And Caption is on.
  4. Style the text in Design → Title Text and Design → Caption Text if you like.
  5. Save the page, clear any page cache, and check the page logged out.

Under each slide’s image, the slider shows the image’s title from the Media Library as a heading, then its caption. The heading is an h3 unless you choose another heading level in Title Text. Images without a title or caption show none. The caption is filtered the way Divi filters it in the grid.

The text uses the same markup as Divi’s grid, so tablet and phone values of Show Title And Caption, the font options and presets all apply. Without any design settings, the title and caption sit a small gap below the image; Divi’s font and spacing options replace that gap.

Note: Show Title And Caption is on by default in Divi, so once you enable the feature, slider galleries you never changed start showing titles and captions. WordPress usually gives an uploaded image its file name as its title. Check the titles in Media → Library, or switch Show Title And Caption off on galleries that shouldn’t show them.

The builder preview doesn’t show titles and captions in a slider. The live page does. Galleries in the grid layout aren’t changed.

Gallery images from a custom field

Divi’s Gallery shows the images picked in its Images field, the same on every page it’s on. With this feature, a Gallery can show the images stored in a custom field of the post being viewed. In a Theme Builder post template, each post then shows its own images.

  1. Add a custom field that holds images to your posts, for example an ACF Gallery field, and fill it on a post.
  2. Open the Gallery module’s settings, for example in your post template in Divi → Theme Builder.
  3. In Content → Images, set Images Source to Custom Field.
  4. Type the field’s name into Custom Field Name.
  5. Save, clear any page cache, and open a post that has images in that field, logged out.
OptionWhat it doesDefault
Images SourceSelected Images shows the images picked in Images, as Divi does. Custom Field shows the images stored in a custom field of the post being viewed.Selected Images
Custom Field NameThe custom field (meta key) that holds the images, for example the ACF field name. Shown while Images Source is Custom Field.Empty

Both options sit at the top of Content → Images, above Divi’s Images field, and have one value for all screen sizes.

What the field can hold

  • An ACF Gallery field.
  • One image ID per entry, for fields saved as several values.
  • A list of image IDs separated by commas or spaces, such as 12, 15, 31, or a JSON list.
  • A single image ID.

Only image IDs are read from the field, and only Media Library attachments are shown. A Gallery shows up to 200 images from one field. The field name can contain letters, numbers, underscores, hyphens, colons and periods. The card’s ACF row shows whether ACF is active, but ACF isn’t required.

On the page and in the builder

On the live page, the Gallery shows the images in that field of the post being viewed, in the order they’re stored. Divi then renders them exactly as if you had picked them by hand, so the layout, Image Count, Image Order and the design options work as usual. A post whose field is empty shows no gallery at all.

The builder can’t know which post a template will show, so its preview keeps showing the images picked in Images, with a note above the module: Images from the custom field “…” of the post being viewed. This preview shows the images picked in Images. Until you enter a name, the note says Enter the Custom Field Name in Content → Images. Picking a few images in Images gives you something to style in the builder.

If you turn it off

  • With the feature off, a Gallery set to Custom Field shows the images picked in its Images field, or none if nothing is picked.
  • With Divi Doctor deactivated, Divi shows the picked images or, with nothing picked, its own fallback: the five newest images in your Media Library. Pick fallback images in Images before you deactivate if that matters.

How it works

Slider captions: Divi already prints the styles for a slider’s titles and captions but leaves the text out. Divi Doctor adds the same title and caption markup Divi uses in the grid under each slide, through Divi’s own rendering.

Custom field images: just before a Gallery renders, Divi Doctor replaces the images picked in Images with the image IDs from the custom field. Divi then loads and shows them itself.

Limits

  • Both features need Divi 5.
  • Slider titles and captions only show on the live page, not in the builder preview.
  • The builder preview of a custom-field Gallery shows the picked images, not the field’s images.
  • Up to 200 images per Gallery from a custom field.
  • Clear any page cache after changing a Gallery.

Questions

If a Gallery shows the wrong images, check the field name and that the post has images in that field. See also Features and bug fixes in the FAQ.