Plugin not working on embedded youtube
-
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 attributerel="lightbox"
, and having animg
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.
- The topic ‘Plugin not working on embedded youtube’ is closed to new replies.