Envira Gallery Documentation
Documentation, Reference Materials and Tutorials for Envira Gallery
Documentation, Reference Materials and Tutorials for Envira Gallery
Would you like to speed up or slow down the transition speed for lightbox images? We will help you create a custom plugin that will help you complete this in a step by step process and we’re with you every step of the way! This custom function can be used for Envira galleries.
To change the transition speed for lightbox galleries, just add the following code to a new file at wp-content/plugins/envira-lightbox-transition-speed.php
.
<?php /* * Plugin Name: Envira Gallery - Control Lightbox Transition Speed * Plugin URI: https://enviragallery.com * Version: 1.0.0 * Author: Envira Gallery Team * Author URI: https://enviragallery.com * Description: Controls the speed of navigating, opening and closing Envira Galleries */ add_filter( 'envira_gallery_get_config', 'my_envira_gallery_get_config', 10, 2 ); function my_envira_gallery_get_config( $data_config, $key ) { if ( $key === 'transition_duration' ) { $data_config['transition_duration'] = 5000; } if ( $key === 'animation_duration' ) { $data_config['animation_duration'] = 5000; } return $data_config; }
return 5000;
. This means when you open, close or navigate through your lightbox images, it will do this in 5 seconds (5000 milliseconds).Not sure how to do that? Just follow these steps:
envira-lightbox-transition-speed.php
. Remember to set the value of the transition you desire. (5000 = 5 seconds).Your last step is to activate the plugin you just uploaded. Simply navigate to the Plugins from within your WordPress dashboard and activate the Envira Gallery – Control Lightbox Transition Speed plugin.
And that’s it! You are now controlling the transition speed for all lightbox images. Want even more control over how your gallery displays? See our guide on how to limit your gallery to show only a certain number of images.
A: Unfortunately no. Once the plugin is installed and activated it will be applied to every gallery that has the lightbox enabled.
A: Unfortunately not at this time. This is only for galleries.