Treehouse: Grow your CSS skills. Land your dream job.

Open youtube video on Lightbox in WordPress

  • # June 29, 2012 at 7:53 pm

    I am working on a WordPress theme which I want to add a Custom Fields for YouTube video, and this is what I got:

    How do I put a YouTube video with this?

    < ?php if (get_post_meta($post->ID, 'youtube', true)) {
    $videourl = get_post_meta($post->ID, 'youtube', true);
    echo '';

    # June 30, 2012 at 11:53 am

    i don’t have experience using custom field. i am sure it is easy to create plugin for this, create shortcode to pass youtube id from editor to plugin, and return value with proper embed code, or in your problem, return a button/link/etc, trigger open lightbox on click.

    # June 30, 2012 at 12:02 pm

    let me know if you still having problem with this. will spent some time to create it. :D

    # July 2, 2012 at 5:51 pm

    I use FancyBox


    'width' : '75%',
    'height' : '75%',
    'autoScale' : false,
    'transitionIn' : 'none',
    'transitionOut' : 'none',
    'type' : 'iframe'
    # July 5, 2012 at 8:20 pm

    Thanks mate, this one did the trick:

    The good thing, I place only the web address, and it makes it a playable video lightbox. Very nice.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.