Have you ever been frustrated by the way WordPress embeds videos in your WordPress Posts? I have!
There’s over 1000 WordPress and WordPress Blog Marketing Video Tutorials in the FullContact Sites Course library, so I’ve got to be careful when I embed video tutorials. I’m constantly checking to see if it will show up correctly on all types of devices like smartphones, tablets and notebooks? What format should it be? Can anyone steal the video… stuff like that.
I’ve also got to keep track of what plugin if any I’m using to embed or protect the individual videos. For example JW Player uses a shortcode and the Amember billing and membership software uses a shortcode in each post to hide or show the content. This makes it really tough to change directions with the technology your using in your WordPress site if you are charging for Memberships.
Luckily WordPress Made Video Easier…
Except when it comes to the default size that the videos get displayed at embedded. If you aren’t sure about how embedding WordPress videos works now make sure to take the WordPress Mastery course (don’t worry it’s free). The simple explanation is that if you add the URL to the video to the content of a post/page in WordPress it will be automatically embedded into the post/page.
There’s two simple things to remember about this though…
So everything seems easy right?
Not quite! Depending on what theme you are using and where the video is hosted, think Vimeo or YouTube, the default dimensions of the video that gets embedded may be either too big or too small on your pages.
If you’re showing a head shot video that might not matter much but what about the screen capture videos that are common for sites that teach people how to do stuff like this one?
The FullContact Sites Course library suffered from this problem. the PageLines theme that we use embedded the lesson videos at only 320 pixels across – really tiny – which were way too small for screen captures so I had to figure out a way to get the videos to be embedded at least at 800 pixels across for the desktop version of the site. (the mobile versions are already taken care of by PageLines and Vimeo)
So here’s today’s simple fix.
If you want to change the default size of the videos that get auto embedded by WordPress follow these simple instructions.
if ( ! isset( $content_width ) ) $content_width = 800;
Remember that your theme may have different ways to edit the functions.php file. For example “Child Themes” often have their own menu item or plugin for settings like for the functions.php file. If you’re not sure make sure to check with the theme author before you start.
James Maduk is the founder of WPBlogSupport.com as well as the author of the 62 Best Selling "Secrets My Mom Never Told Me About Internet Marketing" ebooks. James also runs WPGrow.com a WordPress Campus with Courses, Workshops and Certification for WordPress Bloggers who want to Start, Build and Grow there WordPress Powered business online.