If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
June 7, 2012 at 4:44 pm #13115
I created a YouTube social media button on my homepage, but instead of bringing me to the linked URL it opens up the video in a lightbox. I have videos in my portfolio as well that I want to keep in lightboxes, but I’d like the social media button to take me to YouTube directly. Can you tell me how to code this properly? http://www.a1concrete-leveling.com/newsite/
Thanks so much!
DanielleJune 9, 2012 at 4:13 am #77861June 11, 2012 at 2:14 am #77862
I’m having the same issue. The YouTube social media button is coded to open a PrettyPhoto popup window to display a single video instead of linking to a YouTube URL.
I too would like this changed so it links to a YouTube web page instead of a popup window.June 11, 2012 at 3:01 am #77863
Try to put class=”noLightbox” target=”_blank” on your anchor tags.
IsmaelJune 11, 2012 at 6:39 am #77864
I think I found a fix for this so YouTube links don’t open in a popup unless it’s an actual video.
In line 975 of the coherence/js/avia.js file, change this:
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”] , a[href*=”screenr.com”]’
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”]’
Now you can enter a YouTube PAGE URL in the Coherence social media configuration menu and it will NOT be shown in a popup or give you an error, as in: http://www.youtube.com/user/GIIVideo
IF you want a YouTube video to open in a popup, then you enter the WATCH URL, as in: http://www.youtube.com/watch?v=ebmsFmSe654
I don’t know if this will adversely affect any other YouTube / Popup functionality, but it’s working for the YouTube social media icon.June 12, 2012 at 1:40 pm #77865
Thanks for the replies! Adding class=”noLightbox” target=”_blank” to the anchor tags worked! Thanks again!June 13, 2012 at 6:26 am #77866June 23, 2012 at 6:59 pm #77867
I’m having the same problem as BrianPBurt. My social media vimeo icon opens up a lightbox window, instead of redirecting people to my vimeo page.
You suggested to put class=”noLightbox” target=”_blank” on your anchor tags.
Can you tell me how do I do that? I mean, on what line of what document I can edit that? Sorry, I’m not that clued up with code.
ZorrrrroJune 24, 2012 at 7:13 am #77868
The topic ‘YouTube Link on Social Media Button’ is closed to new replies.