This snippet filters oEmbed output in WordPress (the_content()
) to force responsive embeds.
To use, add the contents of responseive_embeds.less
to your site's stylesheet (if you're not using LESS, don't forget to move the iframe,object,embed
rule outside of .embed-container
and change it to .embed-container iframe,.embed-container object,.embed-container embed
).
Then add the responsive_embed()
function to your theme's functions.php
and insert the add_filter()
call in your theme's setup function.
NOTE: If your theme is not a child theme, this can be placed directly below responsive_embed()
, outside of any function.
No longer works here