If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
December 20, 2013 at 8:05 am #202483
Hello. I’d like to disable the lightbox effect that happens when a user clicks on a link to YouTube or any other video site. I’d like the link to instead take the user to the linked URL (ie., behave the default way). I would however like linked images to continue using the lightbox effect. How do I accomplish this? Thanks!December 21, 2013 at 8:27 am #202822
You can add a “noLightbox” class to the vimeo/youtube links. I.e.:
<a href="http://www.youtube.com/watch?v=CfihYWRWRTQ">My Video</a>
needs to be replaced with
<a href="http://www.youtube.com/watch?v=CfihYWRWRTQ" class="noLightbox">My Video</a>
PeterDecember 23, 2013 at 4:02 am #203169
Thanks Dude. Is there another way, one that doesn’t require adding a class? I’d like this feature disabled entirely.December 23, 2013 at 8:35 am #203188
Please edit js > avia.js and find this code on line 82:
//activates the prettyphoto lightbox if(jQuery.fn.avia_activate_lightbox) jQuery(container).avia_activate_lightbox();
Replace it with:
//activates the prettyphoto lightbox //if(jQuery.fn.avia_activate_lightbox) //jQuery(container).avia_activate_lightbox();
This should disable the lightbox plugin. Remove browser cache then reload the page a few times.
IsmaelDecember 23, 2013 at 10:14 am #203223
Thank you. Is it possible to disable this only for videos? I’d actually like images to use the lightbox effect, just not the videos.
The reasons is that I have a video page (here) that links to different video sources, most of which are not popular video sites like youtube or vimeo. I don’t want the lightbox effect to appear only for popular video sites and not the other sites, creating an inconsistent experience.December 24, 2013 at 7:46 am #203502
Edit js > avia.js, find this code on line 879:
autolinkElements: 'a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg], a[href$=".mov"] , a[href$=".swf"] , a[href*="vimeo.com"] , a[href*="youtube.com/watch"] , a[href*="screenr.com"]'
Replace it with:
autolinkElements: 'a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg]'
Remove browser cache then reload the page a few times.
You must be logged in to reply to this topic.