Video Thumbnails
Fancybox - Calling the Video from the Content (4 posts)

  1. welshhuw
    Posted 3 years ago #


    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" />
  2. Sutherland Boswell
    Plugin Author

    Posted 3 years ago #

    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>
  3. welshhuw
    Posted 3 years ago #

    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.


  4. Sutherland Boswell
    Plugin Author

    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic