Are you looking to embed Facebook video in WordPress website? Facebook videos have certainly been very popular attention grabbers on the news feed. So, embedding them on your website can boost user engagement as well as keep your visitors for a longer period of time.
In this article, we will discuss different ways to embed the Facebook video on the WordPress website. There are mainly 4 different ways. They are:
- Directly Inserting Video via Gutenberg Block
- Embedding Video Using iFrames
- Embedding Video from Facebook Video Embed API
Directly Inserting the Video via Gutenberg Block
This is the easiest way to embed a Facebook video on your website as you can directly place the video on the visual editor while creating/editing posts.
For this, just copy the URL of a Facebook video.
Now paste the URL that you had copied.
After that, preview your video on the frontend. If everything is fine, click on Publish/Update to save changes.
Embedding Video Using iFrame Code
Facebook also provides you the option to embed video using the iFrame code.
To receive the iFrame code, click on the more options button after selecting the video.
Then, click on the Embed option. You will be directed to the Facebook developer page.
From there, go to the iFrame tab and copy the code.
Then, go to the post editor and add a custom HTML block. Now, paste the copied code and click on the Publish/Update button and check out the frontend preview of your post.
Embedding Video from Facebook Video Embed API
An extremely useful feature for Facebook is that it has its own API to embed video players. This will allow you to easily insert the videos on various locations of your website. It means you can place your Facebook video outside posts including sidebars, widgets, and widgets as well.
Firstly go to the Facebook Developer website and paste the video that you want to embed on your website.
Now click on the “Get code” button.
Then, copy the code below step 1, and paste it on the header.php of your WordPress theme.
This method will embed the Facebook Video in your WordPress website. However, it is not good to directly edit the code of your website.
So, we recommend you create a child theme or install Insert Headers and Footers plugin on your WordPress website.
Now paste the code on the header stripe.
Then, copy the code below step 2 and paste it on any location where you want to embed the Facebook video.
Once done, click on Publish/Update button.
This way, you can embed Facebook Video in WordPress website. It will help you to improve the engagement rate of your WordPress website.
If you are looking to embed TikTok video on your WordPress website, you can check out the article: How to Embed TikTok Video in WordPress Website?