Connect with us

Tips & Tricks

How to: Create a fbshare.me shortcode

Social networks are everywhere. I am sure you’re on facebook. Well why not at a facebook share script to your site?

Don’t know PHP that well?

Well here is a simple way to add a share script like fbshare.me to your site, via shortcodes.

Paste the following code in your functions.php file in order to create your shortcode:

function fbshare_script() {
     return '<div class="fbshare"><script src="http://widgets.fbshare.me/files/fbshare.js"></script></div>';
}
add_shortcode( 'fbshare', 'fbshare_script' );

Once done, you can display the facebook share button anywhere on your posts. In WordPress editor, make sure you are in HTML mode and insert the following: [fbshare].

When your post will be published, the shortcode will be replaced by the fbshare.me button.

1 Comment

1 Comment

  1. David Merrick

    October 23, 2009 at 1:59 am

    I didn’t even know you could do this. I’d seen a script to do something similar but it was written in some complicated CURL/PHP code. So thanks for this!

You must be logged in to post a comment Login

Random Search Terms

Title

Top Articles

Top Searches

powered by WassUp

Recent Posts: Fully Net Worth . com

DJ Drama Net Worth: How Rich is the American DJ Actually?

DJ Drama Net Worth: How Rich is the American DJ Actually?

Tyree Cinque Simmons, who is better known as DJ Drama, is an American DJ and record executive producer who is the co-founder of Generation Now that includes top artists such as Lil Uzi Vert and Jack Harlow. As of 2019, DJ Drama net worth is estimated to be around $12 million. Simmons was born on […]

600Breezy Net Worth: How Much is the Rapper Worth Actually?

600Breezy Net Worth: How Much is the Rapper Worth Actually?

Antonio Valentino King, who is better known by his stage name as 600 Breezy, is an American rapper and songwriter. He is also a member of the Black Disciples gang and has had some problems with the law in the past. As of 2019, 600Breezy net worth is estimated to be $700,000. He was born […]

Queen Key Net Worth: How Rich is the Rapper Actually?

Queen Key Net Worth: How Rich is the Rapper Actually?

Ke’Asha McClure, who is better known by her stage name as Queen Key is a rapper who made her breakthrough in 2016 with singles such as “Panic,” “Baked as a Pie,” and “Calling All Eaters.” She is known for her explicit songs and has recently released new projects called Eat My Pussy and Eat My […]

%d bloggers like this: