Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How do I get drop-down menu in front of YouTube videos in Wordpress?

Avatar of Widgett
Widgett asked on
PHPAdobe FlashWordPress
5 Comments1 Solution695 ViewsLast Modified:
Greetings, experts.  Here is my dilemma.

I have the CSS drop-down menu slipping behind a flash movie problem.  Specifically YouTube.  

The good news is I know that with the addition of <param name="wmode" value="opaque" /> and then wmode="opaque" to the embed code, all is well.

However, the prospect of adding those code snippets every time I want a YouTube video to behave properly on my site is a bit daunting.

The further good news is that I found, on this site--


--the code attached which should go into functions.php and will add the code automagically for me.

The bad news is I have tried adding the code to my functions.php and nothing happens.  No error, but when I go and poke at the page with Firebug I can see the code was not added.  Which is amusing, since I see the problem in Safari, IE and Chrome--but Firefox works without adding anything.  Go figure.

I have a feeling there is something simple that I am missing in regards to this php code to get it to work in my functions.php.  If someone could help me with that, it would be fantastic.

If you'd like to see the brokenness in action, you can find that here: http://www.onetusk.com/sandbox/

Thanks in advance for your wisdom.
add_filter('the_content', 'add_opaque_to_all_flash');

function add_opaque_to_all_flash($string) {
    $string = str_ireplace('<embed type="application/x-shockwave-flash"', '<param name="wmode" value="opaque"><embed type="application/x-shockwave-flash" wmode="opaque"', $string);
    return $string;
Avatar of kingweb

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answers