You can use rl_lightbox_args filter.
For example
function custom_rl_lightbox_args($args) {
if (!is_single()) {
return false;
}
return $args;
}
add_filter('rl_lightbox_args', 'custom_rl_lightbox_args');
This will remove lightbox if the page viewed is not single post or page. But you can use any conditional tags available in WP.
I’m having the opposite problem. Any ideas why I’d be getting a “Not Found” error on the homepage but nowhere else?
Error: “The requested URL /www.youtube.com/watch was not found on this server.”
I was able to get it to work by adding rel="lightbox-video-0" to the link tag like so: <a href="www.youtube.com/watch?v=IRVdiHu1VCc" rel="lightbox-video-0">
I’ve got some javascript performing a hover operation on that element, so that could have been the issue—not sure.
Theres not http//: or https:// in your link (http://www.youtube.com/watch?v=IRVdiHu1VCc)
This thread was helpful for me in remove the responsive-lightbox from all pages besides the page called ‘Gallery’.
Here’s the code that I included in the functions.php file:
function custom_rl_lightbox_args($args) {
if ( ! is_page( 'Gallery' ) ) {
return false;
}
return $args;
}
add_filter('rl_lightbox_args', 'custom_rl_lightbox_args');
Hopefully this helps others fix their own issues here. The plugin is great but when not needed it makes sense to remove the requests.
If this is a way to get plugins working, give it to github for Programmer and not for public wordpress users – this is bad