The Facebook Page plugin lets you easily embed and promote any Facebook Page on your website. Just like on Facebook, your visitors can like and share the Page without leaving your site.
Since June 23rd 2015, and with the release of Graph API v2.3, Facebook retired their old Like Box Plugin in favor of the Page Plugin , meaning that the old Like Box that we first shared in 2011 is entirely obsolete. While it has continued to work, it's only a matter of time before it's unsupported. The updated code we published in 2015 also inherited the wrath of Facebook's ever-changing graph features, and is also a little obsolete. The WordPress shortcode, plugin, and PHP function on this page will be updated as required to keep it in fashion.
The Page Plugin can be styled in a minimalist way (see my like button in our sidebar) or it can be further populated with some of your page data. Our shortcode will permit you to quickly and easily modify the look of your Page Plugin whenever a change is required.
You may configue the plugin in any number of ways. Consider the following examples:
[pageplugin hide_cover="true" small_header="true" tabs="" hide_cta="true" width="325"] returns:
■ ■ ■
[pageplugin hide_cover="false" small_header="true" tabs="timeline" hide_cta="false" show_facepile="true" width="500"] returns:
■ ■ ■
tabs="messages" is a feature that will invariably increase the number of people that contact you from your website. In this case, we've also used
width="300" - a more acceptable width for a use in a sidebar. The shortcode of
[pageplugin hide_cover="true" small_header="true" tabs="messages" hide_cta="false" height="300" width="300"] returns the following:
■ ■ ■
You may add multiple tabs - either default FB tabs or those that you create yourself. Usage is via a comma delimited list. The shortcode of
[pageplugin hide_cover="false" small_header="true" tabs="timeline,messages" hide_cta="false" show_facepile="true" width="300"] returns:
The order of the tabs in your shortcode determines the order in which they're rendered.
■ ■ ■
The attributes can get a little confusing so you can refer back here for guidance. Shortcode usage is always a preferable option to pasting Facebook's default code into your website; their code and the features change regularly.
Copy and paste the WordPress function into your theme's
functions.php file or, if you sensibly have one installed, your custom functions plugin. You may optionally download and install our plugin from the bottom of of the page.
It's a requirement when using this function that you download the FBSDK function. Review its use and download the code here. It's possible that your theme is already rendering the SDK by default (open up your source code and search for "
connect.facebook.net" to confirm).
pageis your custom page username or ID.
hide_cover="true"hides the cover photo in the header. It's
show_facepile="true"shows profile photos of friends that like your page. It is
falseby default simply because the header often conflicts with your website.
trueby default. It's usually best to specify a
widthto ensure you maintain control over appearance.
Because of the large number of attributes, adjust the shortcode so that your defaults are 'pre-loaded', meaning that you can render your page plugin with just
js.srcto use your locale: Just replace en_US with your locale, e.g.
ru_RUfor Russian (Russia).
- The plugin is expected to change regularly. Subscribe for updates.
- If you're a client it's likely that we've already installed this feature for you. If not, get in touch.