Shopping Cart (0)

Twitter tweet and Facebook like. Magic.

1 Posted March 22, 2011 by George Categories: WordPress Themes

Sharing is caring, right tadpoles?

So today, we’re going to show you how to auto-magically super-charge your blog posts, with easy-to-click Twitter and Facebook buttons, so that your readers can tweet and like your content seamlessly. Just like the supermarkets put all the chocolates around you when you’re at the tills, so it’s dead easy to drop a couple while you’re feeling great about all the veggies you’ve just bought? Just like that.

And it’s just a single piece code, added to the functions.php file, in your theme folder. Very easy. As always, you want to back up first. So say you were using our free Greyzed theme, you’d be looking in wp-content/themes/greyzed. Find the functions.php file and copy it to say, functions.php.bak.

Now you can go ahead and open functions.php in a plain text editor, like NotePad, or TextMate or something similar. Scroll to the bottom, and then use the ‘view source’ button, top right of the code snippet below, and copy and paste the code as the last function in the file.

function facebook_twitter_button($content){
    if(!is_feed() && !is_home()) {
        $content .= '';
    return $content;
add_action('the_content', 'facebook_twitter_button');

Now save the file, and you’re all done! Open a post on your blog and admire your own geek-itude! Well done!


22/03/2011 10:14 pm

Thank you for sharing. I have a question, when I use the code and place it in my function.php file, it appears like this: – How do I make it look like in your example, the 2 squares?


Leave a Comment

Valentines Giveaway: Win a copy of our new gorgeous theme – Occasions

Love is in the air, and lucky for you frogs aren't immune to Cupid's m... Read more

And the winners are….

Helloo, tadpoles! It's been a good Friday here at the pond, and it'... Read more

Pond-storming: Your ideas and wants

You know we've collected some of the coolest designers and coders to bring you the best WordPress themes in like, evah, right? Yeah, we love you too... Read more

A theme for all Occasions

We're really proud of our latest release. Something for all Occasions!... Read more

George has something new to show you

Hello tadpoles! We're as happy and excited as a dog with two tails, to tell you about the latest theme from the team around the pond. It's called Cohesion, and we like to think of it as "a socially-engaged business theme". Read more

eFrog News Categories

Browse our themes