Envira Gallery Documentation
Documentation, Reference Materials and Tutorials for Envira Gallery
Documentation, Reference Materials and Tutorials for Envira Gallery
Would you like to turn on the Distraction Free viewing when viewing lightbox images on Envira? Distraction Free viewing is where the after 30 seconds, the icons disappear giving full impact of your image in the lightbox. This tutorial will walk you through how to disable that feature in Envira.
To enable the distraction free mode, just add the following code to a new file at /wp-content/plugins/envira-disable-distraction-free.php
:
<?php /** * Plugin Name: Envira Gallery - Disable Distraction Free Mode * Plugin URI: https://enviragallery.com * Version: 1.0.0 * Author: Envira Gallery Team * Author URI: https://enviragallery.com * Description: Disables Distraction Free Mode on Envira Lightbox */ add_filter( 'envira_gallery_get_config', 'my_envira_gallery_get_config', 10, 2 ); function my_envira_gallery_get_config( $data_config, $key ) { if ( $key === 'idle_time' ) { $data_config['idle_time'] = 60; // false would completely turn off the option and is set to false by default. Change this to 60 to have the idle time kick in after 60 seconds } return $data_config; }
If you’re unsure how to create a plugin file, follow these steps below:
envira-disable-distraction-free.php
Your next step is to activate the plugin you just uploaded. Simply navigate to the Plugins from within your WordPress dashboard and activate the Envira Gallery – Disable Distraction Free Mode plugin.
And that’s it! You’ve now disabled the distraction free mode on the Envira Gallery lightbox.
Would you like to try some more fun things with Envira lightbox? Why not check out our article on How to Use the Lightbox Transition Effects.
A: Currently no, this will only apply to galleries for now. We’ll update the doc when this is available for albums so keep checking back!
A: No, this will apply to all galleries (and albums when albums becomes available).