Envira Gallery Documentation

Documentation, Reference Materials and Tutorials for Envira Gallery

Display a Tag Based Dynamic Gallery

You may already know you can use the Tags Addon to create a sortable gallery, but you can also display a dynamic gallery populated with specifically tagged images using shortcode.


First, you’ll need to install and activate the Tags addon.

Once the addon is enabled, you’ll have an additional field in the Edit Metadata lightbox for your gallery images to include tags.

You’ll need to add some tags to your images before the shortcode will work, so go ahead and do that now.

Select a gallery to edit, then select the pencil icon at the top of a gallery image. This will bring up the Edit Metadata lightbox where you can enter the tags you wish.

Be sure to select the Save Metadata button before exiting the lightbox and updating your gallery.

Add tags to individual images in your gallery through the Edit Metadata lightbox.

You can also add Envira Tags right from the WordPress Media Library. Navigate to Media » Library and click on your image. Add any tags here to be used in your gallery.

Now you can include your shortcode in the post or page you desire.

[envira-gallery-dynamic id="tags-rainier,suncadia" default="9"]

In the shortcode example above, we’ll populate a gallery with all images tagged as rainier or suncadia. This will pull images from all galleries you have created on your site.

Assuming there are images found with the tag(s) specified, a gallery will be crafted and cached for your (and your visitors) viewing pleasure.

Dynamic Tags Gallery

That’s it, now you have a beautiful tag based dynamic gallery!

Checkout Envira’s Dynamic Addon for more powerful ways to dynamically generate your galleries.


id (required)
Comma-separated list of tags to populate the gallery with. Use the tag slug and not the tag name or your gallery may not display correctly.

When creating a tag populated dynamic gallery be sure to use the tag slug and not the tag name.

Correct: id="tags-ranier,suncadia,washington-mountains"
Incorrect: id="tags-Ranier,Suncadia,Washington Mountains"

default (optional)
The ID of the gallery whose configuration options the dynamic gallery should use. If using this attribute, it’s important that this gallery exist or your dynamic gallery may not display correctly.

[i]
[i]
[i]
[i]