Envira Gallery Documentation
Documentation, Reference Materials and Tutorials for Envira Gallery
Documentation, Reference Materials and Tutorials for Envira Gallery
With the Deeplinking Addon, you can directly link to a Lightbox view of any image in your gallery. The Envira Gallery plugin automatically generates a URL for your images when you enable deeplinking on your Lightbox galleries. But, it is possible to customize your URL image links with the help of a filter.
In this documentation, we’ll walk through how to apply a filter to create custom URLs for images in your deeplinked galleries.
To create custom whitelabel URLs for images in deeplinked galleries, just add the following code to a new file at wp-content/plugins/envira-gallery-whitelabel-url-for-deeplinked-galleries.php
.
<php add_filter( 'envira_whitelabel_envira_deeplinking_slug', 'test_envira_whitelabel_envira_deeplinking_slug', 10, 1); function test_envira_whitelabel_envira_deeplinking_slug( $deeplinking_slug ) { return 'deeplinkme'; } add_filter('envira_whitelabel', __return_true);
If you’re unsure how to create a plugin file, follow these steps below:
envira-gallery-whitelabel-url-for-deeplinked-galleries.php
You can also choose to add this code to your theme’s function.php
instead of creating a new plugin.
Next, you’ll need to activate the plugin you just uploaded. Simply navigate to the Plugins from within your WordPress dashboard and activate the plugin. That’s it!