Envira Gallery Documentation
Documentation, Reference Materials and Tutorials for Envira Gallery
Documentation, Reference Materials and Tutorials for Envira Gallery
The Dynamic Addon will allow you to easily create dynamic galleries and albums on the fly. This article will help walk you through the many ways in which you can quickly and easily create dynamic galleries.
Please follow our instructions on how to install and activate addons.
In this instance, you’ll be activating the Envira Dynamic Addon.
Your first step is to navigate to the WordPress Admin » Envira Gallery and select the Envira Dynamic Gallery to edit the gallery.
Your next step is to set up your dynamic settings. Simply navigate through each tab of the gallery and create your base settings that will be used for all dynamic galleries.
Finally, you’ll just need to click Publish or Update on your gallery to save any changes you’ve made to your default gallery settings.
Once you’ve completed these steps for galleries, you can repeat these same steps for albums if you’re planning on creating dynamic albums.
The Dynamic Addon can be used to create galleries from images in a number of different scenarios:
XXX
, this is only an example. ALL dynamic gallery ID names should always be unique each time it’s used or this could cause confusion and mixed results.To use this type of a dynamic gallery. You’ll first need to create a new page or post on your site. Then just click the Add Media button to upload images to your post. WordPress will only consider an image attached to a post if it’s uploaded directly and not simply selecting it from the Media Library and inserting it.
Once you’ve uploaded your images, click Publish on the post.
In the browser bar you’ll see the ID number that WordPress assigned and that is the number you’ll need for your dynamic gallery.
For example, if the URL shows this https://yoursite.com/wp-admin/post.php?post=62602&action=edit
, your dynamic shortcode would look like what’s shown below.
Simply add your shortcode to the page and click Update. When you visit the page, you’ll now see the dynamic gallery.
Shortcode:
[envira-gallery-dynamic id="62602"]
Template Tag:
envira_dynamic( array( 'id' => 62602 ) );
Very similar to the process above, you can go to your WordPress admin » Media » Library and find your image ID by looking at the browser URL.
In this example, the URL while viewing the image is https://yoursite.com/wp-admin/upload.php?item=445707
.
Therefore on the images portion of the shortcode, you’d place the 445707 number as one of the image IDs.
You can also install and activate the Show IDs plugin to see a list from the Media’s List view of the actual image ID in the ID column.
Shortcode:
[envira-gallery-dynamic id="custom-XXX" images="600,601,602"]
Template Tag:
envira_dynamic( array( 'id' => 'custom-XXX', 'images' => '600,601,602' ) );
Creating this type of dynamic gallery is a little more technical as the others as it requires direct access to your server files by creating directories inside your /wp-content
directory.
If you unsure what that actually means, it may be best to find an alternative option for creating your dynamic gallery.
Shortcode:
[envira-gallery-dynamic id="folder-gallery"]
Template Tag:
envira_dynamic( array( 'id' => 'folder-gallery' ) );
Some important tips to remember:
folder-
; in the example above you would need a folder called gallery
inside your wp-content
folder.wp-content
directory e.g. wp-content/gallery
. Subdirectories (wp-content/gallery/gallery
) will also work.This is likely the easiest dynamic gallery you can create. If you’ve spent countless hours setting up your WordPress galleries then you really don’t want to recreate all of your galleries again.
To convert your WordPress galleries into Envira Dynamic galleries, just look for the option on the Configuration tab of the Envira Dyanmic Settings to Render all WordPress Galleries using Envira? and this will automatically take any WordPress gallery and change it to an Envira dynamic gallery using the settings from the Envira Dynamic Settings.
There’s nothing more you need to do with adding a shortcode and this is why this is one of the easiest ways to create a dynamic gallery!
As with the WordPress galleries, Envira has also realized that maybe you want to change over your NextGen galleries as well without the need to recreate.
You can easily use the Envira NextGen Importer Addon to import your NextGen galleries or you can also create a dynamic gallery by following the shortode example below, just add a shortcode to your page using the NextGen Gallery ID number. Just be sure to update the NextGen ID number with the ID number for your own NextGen galleries.
Shortcode:
[envira-gallery-dynamic id="nextgen-ID"]
Template Tag:
envira_dynamic( array( 'id' => 'nextgen-ID' ) );
Creating a tag based dynamic gallery using Envira’s Tags Addon is probably our most popular way. We have a more detailed articlet on Display a Tag Based Dynamic Gallery that you may also find helpful.
But for example, let’s say you tagged some of your images with the tag food. An example of that dynamic shortcode would look like what’s shown below.
Shortcode:
[envira-gallery-dynamic id="tags-food"]
id="tags-
before you enter your tags. If you would like to add more than 1 tag in your gallery, you would separate the remaining tags with a comma like this [envira-gallery-dynamic id="tags-balloons,buildings"]
.The Dynamic Addon can also be used to create albums from:
This example would be to create a dynamic album with specific gallery ID nubmers.
If you’re not sure where to find your gallery ID number, check out our article on How do I find my Envira Gallery ID Number.
Once you know your gallery ID number, your shortcode would look something like what’s shown below. Just be sure to separate each gallery ID number with a comma (no spaces needed).
Shortcode:
[envira-album-dynamic id="custom-XXX" galleries="607,611"]
Template Tag:
envira_dynamic_album( array( 'id' => 'custom-XXX', 'galleries' => '607,611' ) );
If you wanted to create a dynamic album that shows all of your Envira galleries, an example of that shortcode is shown below. Just be sure to keep the ID for the album unique.
Shortcode:
[envira-album-dynamic id="custom-XXX" galleries="all"]
Template Tag:
envira_dynamic_album( array( 'id' => 'custom-XXX', 'galleries' => 'all' ) );
Some important tips to remember:
A: Currently the only Pagination Type that can be used for Dynamic galleries is the On Pagination Click, reloading Page.
A: Currently the Watermark tab is unavailable for dynamic galleries. Since the gallery is dynamic Envira does not currently have a way to confirm if the image has already been watermarked.
A: Dynamic galleries pulling from a folder will only look for images from the folder specified in the shortcode. It will not look into any subdirectories for additional images. If you are wanting to pull the images from a subdirectory, you will need to specify that subdirectory like so: [envira-gallery-dynamic id="folder-gallery/subdirectory"]
.
A: For best practices when naming your dynamic shortcodes, it’s always best to not use any characters that can be seen as possible code. Things like semi-colons, colons, commas or number signs should be avoided.
A: First, make sure that the Password Protection Addon is enabled.
Once this is done, you can add the correct information to the Dynamic shortcode to password protect your galleries. You’ll be able to set a username or email using the password_protection_email
option and a password using the password
.
Here’s an example: [envira-gallery-dynamic id="410" password_protection_email="you@you.com" password="123"]
A: Transient cache may cause issues with images in Dynamic Galleries. Please follow the guide for Disabling the Fragment Cache.
A: Absolutely! You can follow along with these docs on categorizing your galleries and then add your shortcode to any post, page or widget like this:
[envira-album-dynamic id="tags-featured-galleries"]
Just remember to change the tags-featured-galleries
to match the slug name of the category you chose for your galleries:
A: You can absolutely use the Albums Addon and create a dynamic album that would pull the latest 4 galleries.
Just add this shortcode to your page and remember to change the name each time you want to use this type of shortcode.
[envira-album-dynamic id="custom=pulllatest5gals" limit="4" orderby="date" order="desc"]
With that above shortcode we’re pulling in the last 4 galleries.
A: Absolutely! You would need to add a bit more to the shortcode to specify the image ID from the step above, but you would also need to specify each URL for each image (in order) like this example:
[envira-gallery-dynamic id="custom-id-external-links-123" images="5272,5271,5270" external="https://www.apple.com/itunes/,https://www.shopdisney.com/,http://amazon.com"]