Support » Plugins and Hacks » Fancybox – Calling the Video from the Content

Fancybox – Calling the Video from the Content

  • Hi,

    I want to use Fancybox to show the videos.

    I have gotten so far as to get fancybox to open when clicking on the video thumbnail, but the video is not appearing. A copy of the post is!

    How do I get the actual video to appear? Is there a php function I need to use. Here is my code:

    <a class="fancybox" href="<?php get_the_content(); ?>">
      <img src="<?php video_thumbnail(); ?>"width="264" height="149" />
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sutherland Boswell


    This isn’t really a Video Thumbnails support question, but I think I know what you need to do.

    <a class="fancybox" href="#data<?php the_ID(); ?>"><img src="<?php video_thumbnail(); ?>"width="264" height="149" /></a>
    <div style="display:none"><div id="data<?php the_ID(); ?>"><?php $content = get_the_content(); $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); echo $content; ?></div></div>

    Thanks for the quick reply Sutherland.

    A vimeo video loaded, but displayed slightly overlapping the fancybox, and the youtube only loaded the actual url link as a string.

    Is there perhaps a way to use this plugin with custom meta boxes?

    Appreciate your help greatly.


    Plugin Author Sutherland Boswell


    Yes, this thread has a fix for using it with a custom meta box.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fancybox – Calling the Video from the Content’ is closed to new replies.