Hi, if you want to add the videos URL then you have to use the following code. This is an example.
<a href="http://www.youtube.com/watch?v=G7z74BvLWUg"
rel="wp-video-lightbox" title=""><img
src="http://example.com/images/thumbnails/youtube.jpg"
alt="YouTube" width="60" /></a>
When using the shortcode you submitted above, you can only add the youtube code found at the end of the URL.
[video_lightbox_youtube video_id=”v3uGJGzUYCI&rel=0″ width=”640″ height=”480″ anchor=”Watch Video” description=”The video description”]
Let me know how you go.
Do I have to have an image for the link? I only want the text “Watch Video”
It is strange that it worked last week. The site theme was updated over the weekend (I am helping the site owner).
I think that the prettyPhoto code is changing https to http.
I will make a static test page to demonstrate the problem.
Sorry, I made a mistake in the shortcode code that I included – I only include the video code, not the full url.
[video_lightbox_youtube video_id=v3uGJGzUYCI&rel=0″ width=”640″ height=”480″ anchor=”Watch Video” description=”The video description”]
I made a standalone copy of the web page with the problem.
https://priceactiontradersireland.com/.wvl/index.html
It has two video links to the same video. One has a text link to the video, the other has an image, like your example.
You can look at the source to see that the video url is https but when you click on the text or image the iframe src is http.
Hi, just a note can you add the extra double quotes ” missing in your shortcode.
video_id=v3uGJGzUYCI&rel=0″
Notice above before v, you should have “v…….
Let me know if that helps or not.
Thank you
Sorry, that is another typo in my post here (I am switching between too many windows this morning).
My PHP code is:
echo do_shortcode(sprintf('<p class="pati_video"><span class="date">%s</span><br>%s <span class="stats %s">%s</span> [video_lightbox_youtube video_id="%s&rel=0" width="640" height="480" anchor="Watch Video" description="%s"] %s</p>', get_the_date(), get_field('summary'), $stats_class, $stats, $video_code, get_field('summary'), get_field('video_length'))); ?>
And you can see that I have the double quotes after video_id=
I am very confident that my code is correct as the generated html looks good. I believe that the javascript (either prettyPhoto or your code) is generating iframe src with http instead of https.
Are you able to see the demo page?
https://priceactiontradersireland.com/.wvl/index.html
Can you try something just for testing purposes. Don’t use your PHP code. Simple use either method below on a test page or post.
<a href="http://www.youtube.com/watch?v=G7z74BvLWUg"
rel="wp-video-lightbox" title=""><img
src="http://example.com/images/thumbnails/youtube.jpg"
alt="YouTube" width="60" /></a>
And or the following code.
[video_lightbox_youtube video_id="v3uGJGzUYCI&rel=0" width="640" height="480" anchor="Watch Video" description="The video description"]
Thank you
Done.
https://priceactiontradersireland.com/mbrsolution/
I did 3 links on the page, 2 x the html you provided (one I changed http to https for the video url) and then the shortcode.
Same problem – lightbox appears but not the video, with Chrome console complaining that the video is http and the rest of the page https.
https://priceactiontradersireland.com/mbrsolution/
I tested the URL in three different browsers including Google Chrome and none of the browses display the video. The lightbox displays but no video.
Can you test one of WordPress default themes like Twenty Fourteen or Fifteen?
If the above does not work can you disable all other plugins except this one and carry out another test.
https://priceactiontradersireland.com/.wvl/ltr-bare.html
I took the static html file and stripped it down. The JS and CSS for WP Video Lightbox are the only files that have been included.
My client has a ton of active plugins. It’s going to be a pain to find the root cause.
Thanks for your help.
All videos work in the stripped down version.
Hi, are you saying that the PHP code you shared above is working for you? If it is something else, you might like to share your solution for others to know just in case they run into an issue similar to yours.
If your issue is resolved can you mark this support thread as resolved.
Thank you
No. I took the static html page
https://priceactiontradersireland.com/.wvl/index.html
and removed all the js/css/markup from other plugins and was left with:
https://priceactiontradersireland.com/.wvl/ltr-bare.html
The videos in the new file work.
So, I conclude that your plugin is not at fault and that it is likely the new theme. I do not have a solution. I cannot try another theme in the Customiser as the page with the problem does not work there.
I can mark it as resolved if you want.
Hi, yes you can mark this support thread as resolved. To me it sounds more like a theme issue than a plugin issue.
You can always open a new support thread in the future if you run into any other issue.
Thank you
I expect that you are right.
Thank you for your help.