Title: Plugin not working on embedded youtube
Last modified: August 24, 2016

---

# Plugin not working on embedded youtube

 *  Resolved [yagodlt](https://wordpress.org/support/users/yagodlt/)
 * (@yagodlt)
 * [11 years ago](https://wordpress.org/support/topic/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 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="
   http://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://wordpress.org/plugins/responsive-lightbox/](https://wordpress.org/plugins/responsive-lightbox/)

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

 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [11 years ago](https://wordpress.org/support/topic/plugin-not-working-on-embedded-youtube/#post-6107022)
 * 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](https://wordpress.org/support/users/yagodlt/)
 * (@yagodlt)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/plugin-not-working-on-embedded-youtube/#post-6107100)
 * 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.

 * ![](https://ps.w.org/responsive-lightbox/assets/icon-256x256.png?rev=3460874)
 * [Responsive Lightbox & Gallery](https://wordpress.org/plugins/responsive-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/responsive-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/responsive-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/responsive-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/responsive-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/responsive-lightbox/reviews/)

## Tags

 * [embed](https://wordpress.org/support/topic-tag/embed/)
 * [problem](https://wordpress.org/support/topic-tag/problem/)
 * [video](https://wordpress.org/support/topic-tag/video/)
 * [Youtube](https://wordpress.org/support/topic-tag/youtube/)

 * 2 replies
 * 2 participants
 * Last reply from: [yagodlt](https://wordpress.org/support/users/yagodlt/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/plugin-not-working-on-embedded-youtube/#post-6107100)
 * Status: resolved