Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

@peterhadorn peterhadorn commented Apr 23, 2015

Thanks, simple and useful :)

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