I could not find this problem in the forum.
If I activate a youtube link it opens the video in a lightbox as expected. But it simultaneously opens a new window with the youtube url (firefox). What am I doing wrong?
Hey Wolfgang!
Thank you for using Enfold.
I tested this on my local installation and it’s not opening a new window.
<a href="http://www.youtube.com/watch?v=G0k3kHtyoqc">Open This</a>
Do you mind if we take a look at the actual page?
Regards,
Ismael
Hi Ismael,
here an example: http://www.oberton.org/maedchenobertonchor-carmina-slovenica/
In the links at the bottom under Quellen & Links you’ll find some youtube links (generated by zotpress plugin). I tested it on firefox and google chrome. Both show the effect of double opening.
Hi!
Please try adding following code to Functions.php file in Appearance > Editor
function add_custom_script(){
?>
<script>
jQuery(window).load(function(){
jQuery("a.lightbox-added").removeAttr('data-wpel-target');
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_script');
Cheers!
Yigit
Hi Yigit!
It works, thank you.
I added the code to the child-theme functions.php. What do you mean with “… in Appearance > Editor”?
But what is the cause of a different behaviour in my case compared to Ismael’s?
Wolfgang
Hey Wolfgang!
He meant that you can make this change via Dashboard (Appearance > Editor > Select child theme functions.php). Anyhow, glad it’s fixed now.
Regarding the other question, perhaps it was caused by a plugin conflict.
Cheers!
Josue