CAEN Knowledge Base
CAEN Knowledge Base

What's the best way to display a video on my WordPress website?

The easiest way to display a video on a page is upload your video to YouTube, and paste the YouTube embed code into the body of your page.

If you don't wish the video to be in the body of your page, or if you would like a video to be available on multiple pages, you can display a video using a thumbnail in a Freeform widget:

When the thumbnail is clicked, the video will then pop-up in a box on the same page: 

To do this, create a Freeform widget and paste the following code, replacing the bolded portions with your video's information:

<div class="widget-lightbox-video">
<p class="widget-lightbox-video-caption">Video Title Here</p>
</div><a href="Video URL Here" rel="wp-video-lightbox" title="Video Description Here">
<img src="Preview Image URL Here" class="widget-lightbox-video-image" 
alt="Video Title Here" /></a>

To get the preview image URL, upload a 200px by 160px image you want to use as a preview in the WordPress media uploader (Select Media, then Add New) and copy the "File URL" on the right of the screen.