Docs

Gallery conflicts

The Enhanced media shortcodes setting changes how WordPress's [gallery] and [playlist] shortcodes choose their files. Themes and gallery plugins that also change those shortcodes can clash with it.

What the setting changes

When a gallery shortcode has category, date or limit attributes (see gallery shortcodes), Media Librarian looks up the matching files and hands WordPress the list. Galleries that list their own images (ids="…") are left alone. A plain [gallery] with no list, which shows the page's attached images, is sorted by the order set in Settings → Media Library unless it sets orderby.

A theme or plugin that draws its own gallery may ignore the list, read the attributes before Media Librarian does, or expect a different order. You might see the wrong images, every image, none, or a different order.

The block editor's Gallery block isn't affected. It stores its images in the page, not in a shortcode.

Check your galleries after turning it on

  1. Open two or three pages that have galleries and check the right images show, in the right order.
  2. Edit one of those pages and open the gallery's settings, to check it still lists its images.
  3. If your theme has its own gallery or slider element, check one of those too.

If something looks wrong

Untick Enhanced media shortcodes in Settings → Media Library and save. Your galleries go straight back to normal. Nothing is stored in your pages, and your categories aren't touched.

Then tell us in the support forum, with your theme, any gallery plugin, and an example shortcode. We'll look at making them work together.

Already handled

Media Librarian includes fixes for these, inherited from Enhanced Media Library:

  • Enfold: its Masonry Gallery element can show a category.
  • FooGallery: its shortcode understands category attributes.
  • Jetpack: the [slideshow] shortcode understands them too.
  • Impreza: the theme's own media category field is turned off so it doesn't clash.
  • SimpLy Gallery and Elementor: the media library filters work in their editors.