Vimeo oEmbeds aren't working (but YouTube is fine)

Hey WPMU dev team. Thanks for the continued support. It really is like having my own WordPress team.

I seem to be having an issue with Vimeo oEmbeds on my site. YouTube oEmbeds are working great. I can't figure out for the life of me what is going on.

I have a custom function in my theme that could be causing a problem. It helps add the wmode=opaque to YouTube videos to prevent videos from overtaking other page content:

/* Function to prevent flash embeds and iFrames from having a z-index greater than anything else */
function add_video_wmode_transparent($html, $url, $attr) {

	if ( strpos( $html, "<embed src=" ) !== false )
	   { return str_replace('</param><embed', '</param><param name="wmode" value="opaque"></param><embed wmode="opaque" ', $html); }
	elseif ( strpos ( $html, 'feature=oembed' ) !== false )
	   { return str_replace( 'feature=oembed', 'feature=oembed&wmode=opaque', $html ); }
	   { return $html; }
add_filter( 'embed_oembed_html', 'add_video_wmode_transparent', 10, 3);

I disabled the function and I still can't get Vimeo to work.

Here is my test site:

Anyway you could help?

  • Arnold
    • El Macho WP

    Looking at the resulting code in your page you don't have any player associated with the video, just the url string. It should look something like this

    <iframe style="text-align: center;" src="" frameborder="0" width="400" height="300"></iframe>

    That's using the number in your example page.

  • LogDun
    • New Recruit

    Thanks for the quick response ArnoldB.

    What you mentioned is precisely the problem. WordPress should be spitting out the rest of the code via oEmbed, but it isn't. When I publish a post with a vimeo link it doesn't automatically do it; I have to manually enter the embed code. That's fine for me, but the rest of our bloggers need it to be quick and easy, hence the desire for the oEmbed.


  • LogDun
    • New Recruit


    Something is happening.

    I added the following code to my functions.php file and still, same problem:

    add_action('init', 'add_vimeo_oembed_correctly');
    function add_vimeo_oembed_correctly() {
        wp_oembed_add_provider( '#http://(www\.)?vimeo\.com/.*#i', '{format}', true );

    I tried simply typing in "www" at the beginning of the vimeo URL and still no luck:

  • aecnu
    • WP Unicorn

    Greetings LogDun,

    It appears with this issue we have come up against a brick wall.

    This seems to be a browser specific problem. We believe it is the oembed is using a codex that IE 9 doesn't understand.

    If we use the Vimeo universal embed it works on IE9.

    Therefore I have been investigating a possible solution for this and perhaps Easy FancyBox plugin or maybe even NFB Video plugin as a possible solution.

    You may want to give one of these a spin and if so please let me know how it goes.

    Cheers, Joe

  • LogDun
    • New Recruit

    Thanks @awcnu and @Arnold for the responses.

    On my MU install I can't get the oembed Vimeo link to work on any browser (works just fine on my single-site WP install). As you said, dropping the standard, Vimeo provided embed into the HTML works just fine, but oembed does not.

    Thanks for looking into this. In the meantime I will give the plugins you suggest a try.


  • aecnu
    • WP Unicorn

    Greetings LogDun,

    Just checking if this issue was eventually resolved in another thread? Or by yourself separately to us? Or by us over email with you? Or using our live support?

    If so, no need to reply, that's great news.

    If not, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, happy days, glad you got it sorted :slight_smile:

    Thank you for being a WPMU Dev member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.