Adding Videos

With this theme, you can easily add videos from different video sites. There are several sections that you can add videos to.

  • Widgets:
  • Video Non-posted (video-non-posted.php)
  • Video Sidebar (video-sidebar.php)
  • Home page layout sections:
  • Video Numbers (video-numbers.php)
  • Video Tabbed (video-tabbed.php)

All posted videos must have a tag of “Videos.”

I’ve tested it with YouTube, Google Video, and MetaCafe. This is done by creating a video post. I’ve also written a post on how to add videos to your WordPress sidebar, which might come in handy if you hit a snag. Adding videos is easy if you’ve used custom fields before.

To add a video from YouTube, Google, or Metacafe:

  • Find the video that you want and grab the embed code.
  • YouTube example: Here’s an example video I have on YouTube.

Highlight the YouTube video embed code

The embed code is:

<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/FE_XpRmtcJw&rel=1"></param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/FE_XpRmtcJw&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355">
</embed>
</object>

We want to strip that down to the simplest thing we can get it to — the URL

http://www.youtube.com/v/FE_XpRmtcJw&rel=1

Now, remove the “&rel=1” from the end because we don’t need that. Your URL should now look like:

http://www.youtube.com/v/FE_XpRmtcJw

Create a custom field Key named “Video” (it must be capitalized - case-sensitive). In the Value field, add the URL http://www.youtube.com/v/FE_XpRmtcJw.

Inputting a custom field for adding YouTube videos to your site

Now, you can write your post, but it must have a tag named “videos.” Your latest video will now show up in the sidebar.

Comments are closed.