Skip to content

Instantly share code, notes, and snippets.

@schilke
Created April 20, 2015 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save schilke/247cdde4c300244d6d7d to your computer and use it in GitHub Desktop.
Save schilke/247cdde4c300244d6d7d to your computer and use it in GitHub Desktop.
Make embedded videos fully responsive
/* Add responsive container to embeds */
function jsc_embed_html( $html ) {
return '<div class="video-container">' . $html . '</div>';
}
add_filter( 'embed_oembed_html', 'jsc_embed_html', 10, 3 );
add_filter( 'video_embed_html', 'jsc_embed_html' );
@peterhadorn
Copy link

Thanks, simple and useful :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment