I tried lightbox-plus, fancybox, etc…
But I couldn’t figure how to do it.
Those videos are images posts with a link containing a Youtube video:
<p><a href="http://www.youtube.com/watch?v=zUN826BdvV4">
<img class="alignnone size-thumbnail wp-image-40"
title="Screenshot" src="http://localhost/custom-post-type/
wp-content/uploads/2011/01/Screenshot2-150x150.png"
alt="" width="150" height="150" /></a></p>
Fancybox for WordPress, for example, let me add a lightbox to images, but if the image links to a Youtube video it doesn’t work.
Any suggestions?
A simple way to do this would be to use PrettyPhoto (link to site, link to wordpress plugin). It is simple to activate:
And the HTML is pretty clean:
Have you seen the FancyBox Blog? There is an example there of a YouTube video in a Fancybox:
http://fancybox.net/blog
Script tag to import FancyBox:
JavaScript/Jquery to bind click event:
HTML:
I figured out how:
It seems like it works with links with inline content attached to it.
(Please let me know if there’s a better solution to this).