Add wrapper to only youtube videos via embed_oembed_html filter function
$url will contain the full URL to the embed source. E.g.: https://www.youtube.com/watch?v=_UmOY6ek_Y4, so you have to search within $url to see if the provider’s name appears: add_filter( ’embed_oembed_html’, ‘wpse_embed_oembed_html’, 99, 4 ); function wpse_embed_oembed_html( $cache, $url, $attr, $post_ID ) { $classes = array(); // Add these classes to all embeds. $classes_all = array( ‘responsive-container’, ); … Read more