Home Blog Display The Facebook Save Button With WordPress Shortcode (or PHP)

Display The Facebook Save Button With WordPress Shortcode (or PHP)


From Facebook, “the Save button lets people save items or services to a private list on Facebook, share it with friends, and receive relevant notifications. For example, a person can save an item of clothing, trip, or link that they’re thinking about and go back to that list for future consumption, or get notified when that item or trip has a promotional deal”.

Pages saved to Facebook via a website save button may later be shared on the platform. In its most basic form, the save button acts like a social bookmark. If you’re in the ‘business of business’, having the save button continues to work for your conversion by reminding users of saved pages.

Saves can be removed from within Facebook or your website.

The Result

The button above shows a small button aligned to the left ([fbsave align="left" size="small"]). By default, the code will return a large button centered as follows (using [fbsave]):

When our shortcode is used, the current page is returned by default, although another page can be referenced. Attributes are listed below.

Shortcode Attributes

The following shortcode are available to alter the save button’s behaviour.


The current page is returned by default. To use another page, use [fbsave url="http://www.beliefmedia.com/"].


Two sizes are available: small and large. Use as follows: [fbsave size="small"].


By default the button will center in paragraph tags. To align left or right, use [fbsave align="left"] (CSS applies as per below).


The padding applies to the button when aligned left or right only (defaults to 8px 15px; 8px 15px. To change the default behaviour, alter the shortcode function, or use the following in your shortcode: [fbsave padding="5px 10px 5px 10px"].

Shortcode Function

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).

If you require shortcode to work in a sidebar widget, you'll have to enable the functionality with a filter. If you're using our custom functions plugin, you'll have that feature enabled by default.

PHP Function

The following function may be used outside of WordPress. Again, the SDK is required.

The $args array keys of url, size, align, and padding are merged into the resulting $atts array.


  • If you’re a business and require that the SAVE button be integrated with your product catalogue, get in touch with us. It’s somewhat of a necessity for any e-commerce presence to build these Facebook features into your website as a means to supplement your advertising and marketing strategies.
  • All saved links will be added to the Saved view, which can be found at www.facebook.com/saved or for mobile apps via navigating to More -> Saved.


Title: Display Facebook Save Button
Description: Display Facebook Save Button with WordPress Shortcode (or with PHP).
Download: Shortcode (V0.1) | WP Plugin (V0.1) | PHP Code (V0.1)

■ ■ ■

Interested in WordPress and Web Design? Subscribe to our list and we'll send you subscriber-only tools and plugins

Short URL for this post: http://shor.tt/Jn6


Please enter your comment!
Please enter your name here