Hosting Tutorial & Guide

How to Embed a Facebook Video to WordPress Sites

updated on Aug 24, 2016
How to Embed a Facebook Video to WordPress Sites Video marketing has already been a popular content marketing strategy in the modern world. Nowadays, almost all the popular social networks, including Facebook, make video sharing very easy.

Many businesses maintain a Facebook page and share posts as well as videos on it when necessary. If you are one of them, you may want to embed some of the videos to your WordPress site after sharing them on Facebook. Doing so has several benefits.
  • You can reach a wider audience with the same video from both your Facebook account and your WordPress site.
  • You are able to increase the likes of your Facebook page, which potentially benefits your social media marketing progress.
  • For the sake of performance, it is not suggested to upload videos to WordPress sites directly, but embedding videos from Facebook resolves the problem.
If you are a Facebook fan who publishes original videos for marketing purpose, you will need one of the following methods in order to embed those videos to your WordPress posts or pages.

Method 1: Embed a Facebook Video in WordPress Manually

There are multiple ways for integrating Facebook with WordPress. For instance, Facebook itself offers a complete series of integration options including an embedded video player plugin which comes with a code generator for videos. The code generated by the plugin can be used on your website directly. This method is good for promoting your personal profile or Facebook pages.

To embed a Facebook video with the manual way, you need to complete the following steps. Note that the video must be public.

Step 1: Get the video URL

After sharing a video on Facebook, you will be able to see the publish time/date below your page or profile name. Right clicking the time, you can get the option to copy the video URL. Or you can also find the URL you need in the browser address bar.

Get Facebook Video URL

Step 2: Get the embed code

As is mentioned, Facebook offers a code generator. So as soon as you have copied the video URL, you need to go to this page and paste the URL to the Code Configurator. In the configurator, you are able to set the width of the video (in pixel), and choose whether to include the full post in the code. After making your decisions, click on the "Get Code" button.

Get Facebook Video Embed Code

Now you should get a popup in which you will see two pieces of code.

Facebook Video Embed Code

Step 3: Embed the code to your WordPress site

The two pieces of code have to be placed at different places on your WordPress site. For the first one, you need to add it to the header section of your website. If you feel good to edit your theme, you can simply paste the code after the <body> tag of the header.php file in your child theme.

Or in the case that you don't want to mess up with your theme files, you can install a plugin named Insert Headers and Footers. This plugin manages the header and footer scripts for you. Therefore, instead of editing the theme files, you are able to put the code in the plugin settings.

Add Code to Website Header

After the plugin settings are saved, you can copy the other piece of code and paste it anywhere on your WordPress site, for example, in a post, a page, or a text widget. That's all, the video will display properly at the place you paste the embed code.

Add Embed Code to Website

Note that the first piece of code only needs to be pasted to your website for once no matter how many Facebook videos you'd like to share on your WordPress site. So in the next time when embedding a Facebook video, you can ignore it and copy the second piece of code only.

Method 2: Embed Facebook Videos by Using a Plugin

The manual method introduced above is simple, but some beginners might find it a headache to look at the long codes. Fortunately, WordPress comes with plugins that can eliminate the trouble for you, among which Facebook Video Embed is a good one.

This plugin makes it super easy to embed any public Facebook video into a WordPress post or page by offering a shortcode. When you want to add a video, you only need to copy the video URL and paste it in the shortcode, and then the video will appear. There is no code to care about. Besides, the plugin doesn't come with any setting. So you can start using the shortcode as long as the plugin is activated.

Below is the shortcode that is available. Besides the video URL, you can also customize the width and height of the video, and choose whether to display the full post.

Facebook Video Embed Shortcode

If you edit your posts or pages with WordPress visual editor, things are even easier. As the plugin adds a video embed button to the visual editor, you can embed a Facebook video successfully by clicking on the button and entering the video URL.

Facebook Video Embed Button