Documentation, Reference Materials and Tutorials for Envira Gallery
Would you like to create a tag based dynamic gallery? With Envira this is simple and easy to do with a little help from 2 of our addons. This tutorial will walk you through all the steps needed to create a tag based dynamic gallery.
- Ultimate, Agency or Pro Envira license. You can read how to upgrade to one of these licenses here.
- WordPress 4.4+
- Envira Gallery 126.96.36.199+
- Tags Addon 1.1.0+
- Dynamic Addon 1.0+
Please follow our instructions on how to install and activate addons.
Step 1 – Tag Your Images
There are multiple ways to tag your images with Envira Tags.
Add Envira Tags to Your Images from a Envira Gallery
You can easily tag your images from any Envira gallery by editing your gallery images.
First, select a gallery to edit.
Next, select the blue pencil icon at the top of a gallery image.
The Edit Metadata window will open and here you’ll enter the tags on your gallery images on the Tags field.
When you’re finished adding your tags, close the Edit Metadata window by clicking the X button in the top right corner.
Then click Update on your gallery.
Use the Media Library to Tag Your Images
You can also add Envira Tags right from the WordPress Media Library.
To start, navigate to Media » Library and select the image you want to tag.
In the Envira Tags field, just type in your tag and click Update to save your changes after each image you edit.
Step 2 – Configure Your Envira Dynamic Settings
Edit the Envira Dynamic Gallery to configure your gallery settings for all dynamic galleries on your site.
Step 3 – Add Your Dynamic Shortcode
Finally, just add your dynamic shortcode to any page, post or widget area on your site.
You’ll first need to get the slug name of the tags you want to use.
To do this, go to Media » Envira Tags.
In the Slug column, copy the slug name for each tag. These are usually lowercased. Any spaces are separated with hyphens.
For the purpose of this documentation, we’re going to create a tag based dynamic gallery using all images tagged as
Our shortcode would look like this:
Any images tagged in your galleries or in the WordPress Media Library with either of those tags would show in your dynamic gallery.
That’s it, now you have a beautiful tag based dynamic gallery!
Would you like to do more with the Dynamic Addon? Checkout Envira’s Dynamic Addon for more powerful ways to dynamically generate your galleries.
Can I do the same for albums?
A: Absolutely! You’ll use the same concept but instead of tagging your images, you’ll be tagging your galleries.
When you activate the Tags Addon, you’ll see a sidebar box show on your gallery pages called Envira Categories.
Just click Add New Category under the Envira Categories sidebar.
Type in your category name and click Add New Category button.
You’ll still need to use the slug name for the category.
Then your dynamic album should code would like this:
That shortcode would populate your dynamic album with any galleries that have been assigned the Music category.
Can I use an ‘and’ for my dynamic gallery?
A: Of course!
By default, a tag based dynamic gallery will check for images that match each individual tag.
However, if you want to match only images which contain all the tags indicated in the shortcode you can add
operator="AND" to the shortcode.
[envira-gallery-dynamic id="tags-one,two,three" operator="AND" default="2475"]
That shortcode would only show images that have been tagged with one, two and three.