Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #978784
    NinjaTeX
    Participant

    Hello,

    Is there a php function to use for opening a video in a lightbox? I have had a custom post type created and am using x theme button class x-btn for buttons. I would like one of my buttons to open a youtube or vimeo video in a lightbox.

    or how else may I achieve this. I’ve searched and have’t been able to find a solution that works yet.

    thanks
    Jesse

    #979460
    Friech
    Moderator

    Hi Jesse,

    Thanks for writing in! You can use the button and lightbox shortcode instead, which you can paste on a RAW content element.

    [x_button class="btn-lightbox" href="https://www.youtube.com/embed/8fTIxv_i54c"]Click me![/x_button]
    [lightbox selector=".btn-lightbox"]

    Replace the href value with your own YouTube video.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-978784 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>