Have you ever been to a site where you notice that media elements, like YouTube videos, override other content? This can happen if you have dropdown menus, floating bars, lightbox popups, etc. In this article, we'll show you how to prevent YouTube oEmbed from overriding your WordPress content.
Example:
When you embed a video in WordPress, by default it doesn't have the value wmode=transparent. What that means is that video elements have the highest priority and will override any floating or dynamic elements.
This gets really annoying. So let's take a look at how to add? Wmode =transparent to YouTube videos in WordPress without using the ugly iFrames method.
All you have to do is open your theme's functions.php file, or better yet, your site's plugin file, and paste the following code:
función add_video_wmode_transparent ($ html, $ url, $ attr) if (strpos ($ html, "