Nowadays, social media platforms are part of our lives. Since its launch, Facebook has rapidly increased its popularity in the worldwide web. You can add Facebook sharing links to your website. In addition, you can share a Facebook feed on your website.
With this feature, you can inform your audience about events that are happening and remain up to date. In this article, we will teach you how to embed a Facebook event in WordPress.
What is a Facebook event?
The Facebook event works as a calendar. In this calendar, you can add upcoming events and inform your audience about them.
This event can be the introduction of a product or discussion about new business strategies. These events can be published and you can invite your audience to view them. With this feature, you can reach a broad audience in a short amount of time.
How to Embed a Facebook Event to WordPress?
To add a Facebook event to WordPress you don’t need any programming knowledge. However, you can also add it through code.
In this article, we will teach you the best and quickest way. Also, a method that is low risk.
Fortunately, there are thousands of plugins available in the WordPress plugin store. There is also a plugin that adds a Facebook event to your website.
After activating this plugin, you need to change some settings. Head over to your WordPress dashboard > Settings and click on “Embed Facebook”. Once you are on the new page, from the “Magic Embeds” tab scroll down to Facebook settings.
In this section, you need to enter the Facebook app ID and Secret keys. To achieve these two, follow the steps below:
Other than WP Embed Facebook plugin, you need to have the Facebook app installed on your website. You need this app to display the Facebook feed on your website.
1. From your browser open Facebook App Developers
2. After logging to Facebook click on “Create first app”
3. A new window will open; you can choose a name and email for your app
4. After entering the required information, you need to click on “Create App ID”
5. Finally, you will be redirected to your Facebook App settings in the WordPress dashboard. On this page, you can see your secret key and App ID.
Now that you’ve got the required App ID and secret key, you need to copy and paste them into your plugin. Once everything is done make sure you click on “save all changes”.
Now you can add your desired event to a page or a post. To do so you need to copy the code below into your editor:
[fb_plugin page href="https://www.facebook.com/YourFBPage" tabs="events"]
This piece of code will display events created by “YourFBPage” page. If you want to display your personalized event, you need to add the code below to your website as well. Also, replace the link with your link:
Embed Facebook Event to WordPress using Facebook Page Plugin
Another way to embed a Facebook event to your WordPress is by using Facebook Page plugin. In this method, you need to change your theme’s code.
First, head over to Page Plugin. From the “Facebook Page URL” enter your Facebook page URL.
One of the many features of this plugin is displaying multiple tabs of your Facebook page. After entering your Facebook page URL, enter events into the tabs section. Immediately after entering your event a preview will be displayed to you.
You can also resize the preview from the same page.
Once you have made your changes, make sure you click on “Get Code”. A new window will open where you see the requested code.
The first part needs to be added to your header.php file right after the body tag. The second part needs to be added to the widget, post or content you want to display the event on.
After following these steps you can head over to your website and preview the embed Facebook event you have added to WordPress.