• Resolved yagodlt

    (@yagodlt)


    Hi there,

    I’m quite new to WP so I’d ask that you please be patient with me.

    I really like the plugin and how easy and effective it is on image galleries, where everything is straight forward, but, when it comes to making it work on embedded videos I am finding myself unable to get it to work.

    I’m building a site for a good friend and she wants to be able to add videos by pasting them on the WYSIWYG editor (which WP turns into their embed code). I’m using WP 4.2.2 (the latest at the time of writing)

    I’ve learned from reading a lot of threads in this forum (and some from prettyPhoto too) that the straight forward way to make it work is by having an anchor tag with a href pointing to an image file plus the attribute rel="lightbox", and having an img element as a child. Something like:
    <a href="path/to/my/pic" rel="lightbox"><img src="path/to/my/pic"></a>
    Maybe I’m just too much of a novice but I don’t see how I can reproduce that setup with iframed videos…
    Using javascript I’m able to change the markup until it looks like:
    <a href="https://placehold.it/350x150" rel="lightbox"><iframe src="https://www.youtube.com/embed/1Kb7coS1dss?feature=oembed" allowfullscreen="" frameborder="0" height="281" width="500"></iframe></a>
    but this doesn’t seem to do the trick.

    I am really at a loss, is there any way to make this work? I really would appreciate any help.

    https://www.ads-software.com/plugins/responsive-lightbox/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author dFactory

    (@dfactory)

    It will not work like that if you use iframe. All you need is to put the url of the embed video into the href attribute of the link and set an anchor.

    Something like:

    <a href="https://youtube.com?watch...">Click to watch the video</a>

    Thread Starter yagodlt

    (@yagodlt)

    Thanks for answering! and sorry I didn’t see your answer before…

    I will try to get it to work how you suggest if my friend decides that she really wants it like that (site is live now).

    For the time being I’ll mark this as resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin not working on embedded youtube’ is closed to new replies.