I really like how you can just paste a URL right into the post… such as:
http://youtube.com/watch?v=xyz
or http://vimeo.com/123456
What I want to do is change the default code for this to support the code from here: http://embedresponsively.com/
How can I go about overwriting the youtube and vimeo code, I’m assuming in functions.php somehow?
Taking a closer look at the code provided on that site, it appears that the main differences with what it output by default by WordPress is the following:
embed-container
In WordPress, to wrap the embed iframe, add the following to your theme’s functions.php or to a functionality plugin:
and add the CSS generated by http://embedresponsively.com/ to your theme:
I tested the filter and it worked just fine. I did not test the CSS though, that will be up to you to play with.
Source for the filter: http://wordpress.org/support/topic/adding-a-wrapping-div-to-video-embeds?replies=2