Dropdown Menus Behind Embedded Videos

In some browser/platform combos the dropdown menu will be hidden behind embedded videos. Here is some code that will help that. It is only applicable to YouTube.

function add_wmode($html, $url, $attr) {

if (strstr($html,'http://www.youtube.com/embed/')) {
return str_replace('feature=oembed','feature=oembed&wmode=opaque',$html);
} else {

return $html;
add_filter('embed_oembed_html', 'add_wmode', 10, 3);

It is based on code from these websites:

Leave a Reply

Your email address will not be published. Required fields are marked *