• Resolved dmattock

    (@dmattock)


    HI, I am trying the free version of responsive vimeo and youtube lightbox before possibly purchasing the pro version.

    I’m having trouble getting it to work. I’m using Beaver theme and beaver builder and want call it from a button, I’ve tried adding the class and all sorts but cant get it tow work.

    Can it be called from a button?
    Many thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Vongries

    (@davidvongries)

    Hey @dmattock,

    yes, it can basically be called by any element. Do you load the shortcode on that particular page you’re trying to trigger the lightbox?

    Best,
    David

    Thread Starter dmattock

    (@dmattock)

    Thanks for the quick reply.
    I managed to get it working thanks. After reading some other posts as well, I had to add
    [ryv-popup video=”https://vimeo.com/184828368?autoplay=1″%5D to some html on the page,

    then the vimeo link on teh buttton link

    and finally the class “ryv-popup” to a custom class field on the actual button

    Is it possible to add the [ryv-popup video=”https://vimeo.com/184828368?autoplay=1″%5D
    to all pages or a select few pages together instead of individually? perhaps in my custom functions.php? although I am not very familiar with php

    I have one strange issue now though

    On mobile it flashes up all centred and starts playing then jumps off screen top left and all you can see is the corner !?

    Do you know why this is happening, I’ve cleared all my caches
    http://fullrotation.com

    • This reply was modified 7 years, 12 months ago by dmattock.
    • This reply was modified 7 years, 12 months ago by dmattock.
    • This reply was modified 7 years, 12 months ago by dmattock.
    Plugin Author David Vongries

    (@davidvongries)

    Hi @dmattock,

    I saw that the shortcode is wrapped in a div with the class

    fluid-width-video-wrapper

    That’s causing the issue. Please don’t nest the shortcode and load it ideally after the opening body tag.

    To add the shortcode to specific pages, you can try something like this:

    <?php
    
    function prefix_my_function() {
    	if( is_page( array( 32, 110, 219 ) ) ) {
    		echo do_shortcode( '[ryv-popup video="https://vimeo.com/184828368?autoplay=1"]' );
    	}
    }
    add_action( 'fl_body_open', 'prefix_my_function' );

    make sure to replace the id’s in the array above with the id’s of your actual pages.

    I assume you’re using the beaver builder theme, so I’m using the fl_body_open hook here to add the shortcode right after the opening body tag.

    That code needs to go in your child theme’s functions.php

    Best,
    David

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Call lightbox from a button?’ is closed to new replies.