Modify Youtube Oembed URLs to remove showinfo and more

There are different methods for modifying Youtube’s iframe url to get the look and feel you want for your embedded youtube video. WordPress offers Oembed functionality which makes it easy for WordPress users to input youtube urls into metaboxes, content, etc. What is not as straight forward is altering the appearance that WordPress’s Oembed outputs. Changing WordPress’s Oembed iframe URL parameters can be quite cumbersome for some. It’s important to be able to remove and modify some of the default settings of the youtube iframes. Ie: the titles using youtube api’s showinfo attribute. With oembeds, you can’t simply change the output of the iframe URL by pasting in the showinfo and rel attributes at the end of your WordPress content or metabox’s URL slug.

To make these changes, you can add this code snippet to your functions.php file.


Things to consider:
1.To play video in High Def: HD=1
2. To remove related videos: rel=0
3. To remove youtube control bar: controls=0
4. To remove frame or border: frameborder=”0″
5. To remove title of video: showinfo=0