如何在WordPress中添加新的Facebook页面插件

Facebook like box also known as Facebook fan box has become a must have element for many websites. Recently Facebook replaced this widget with the new Facebook Page plugin. In this article, we will show you how to add the Facebook page plugin in WordPress.

Facebook like box也被称为Facebook fan box已成为许多网站的必备元素。 最近,Facebook用新的Facebook Page插件替换了此小部件。 在本文中,我们将向您展示如何在WordPress中添加Facebook页面插件。

Note: Users who have already implemented the old like box or fan box on their WordPress sites will automatically be moved to the new Page plugin.

注意:已经在其WordPress网站上实现了旧的“喜欢”框或风扇框的用户将自动移至新的Page插件。

什么是Facebook Page插件? (What is Facebook Page Plugin?)

Preview of a Facebook Page  plugin embed

Facebook page plugin is the replacement of what was previously known as the Facebook Like box. It allowed you to promote your Facebook page on your website. The new Facebook Page plugin does the exact same thing.

Facebook页面插件是对以前称为Facebook Like框的替代。 它允许您在您的网站上宣传您的Facebook页面。 新的Facebook Page插件执行的功能完全相同。

It has a new and improved look which now displays your Facebook cover photo as well. It comes with two buttons. Users can Like your page, and they can also share it. You have the option to show users which of their friends have already liked your page. You can also display recent posts from your Facebook page.

它具有经过改进的新外观,现在也可以显示您的Facebook封面照片。 它带有两个按钮。 用户可以顶您的页面,也可以共享它。 您可以选择向用户显示哪些朋友已经喜欢您的页面。 您也可以显示来自Facebook页面的最新帖子。

影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

如何在WordPress中添加新的Facebook页面插件 (How to Add The New Facebook Page Plugin in WordPress)

First you need to visit Facebook’s Page Plugin website. You will find the options to configure the appearance of your Facebook page embed.

首先,您需要访问Facebook的Page Plugin网站。 您将找到用于配置嵌入的Facebook页面外观的选项。

Facebook page plugin settings

Simply provide the URL of your Facebook page. Next you will need to enter the width and height for the box. Alternatively, you can leave it blank, and Facebook will try to automatically adjust it.

只需提供您的Facebook页面的URL。 接下来,您需要输入框的宽度和高度。 或者,您可以将其保留为空白,Facebook会尝试自动对其进行调整。

You can show your cover photo, posts, and friend’s faces in the page plugin. Once you are satisfied with the appearance, click on the Get Code button to continue.

您可以在页面插件中显示封面照片,帖子和朋友的脸。 对外观满意后,单击“获取代码”按钮继续。

Facebook page plugin code

Facebook will now show you two code snippets. Copy the first code snippet and paste it in your theme or child theme‘s header.php file right after the <body> tag.

Facebook现在将向您显示两个代码段。 复制第一个代码段,并将其粘贴在您的主题或子主题header.php文件中, header.php<body>标记之后。

Next, copy the second code snippet and paste it anywhere you want to display the page like box. You can also paste this code snippet into a text widget by going to Appearance » Widgets.

接下来,复制第二个代码段,并将其粘贴到您想要显示页面(如框)的任何位置。 您还可以通过转到外观»小部件,将此代码段粘贴到文本小部件中

We hope this article helped you add Facebook Page plugin to your WordPress site. You may also want to check out our article on 5 quick ways to get more Facebook likes using WordPress.

我们希望本文能帮助您将Facebook Page插件添加到WordPress网站。 您可能还想看看我们的5种快速方法文章, 以使用WordPress获得更多Facebook喜欢

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-add-facebook-page-plugin-in-wordpress/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值