Skip to content

Reverb Studios Design

Photo Retouching & Digital Design, Leitrim Ireland

  • Home
  • Contact Me
  • Projects
  • Testimonials
  • Privacy Policy
  • Facebook
  • Twitter
  • Linkedin
  • youTube
  • Pinterest
Reverb Studios Logo

Digital Design & Photo Retouching, Leitrim Ireland.
www.ReverbStudios.ie

Enter your email address to follow this blog and receive notifications of new posts by email. You can unsub at any time.

Join 2,844 other followers

Search Blog

Categories

  • General
  • News
  • Services
  • Projects
  • How tos
  • Internet Tips
  • WordPress
  • Photo Editing
  • SEO
  • Web Optimisation Tips
  • Reviews
  • Video Tutorials

Tags

  • 3
  • blogging
  • broadband leitrim
  • facebook
  • google
  • gravity forms
  • linkedin
  • photo composition
  • photo editing
  • photoshop
  • seo
  • social media
  • social networking
  • Twitter
  • wordpress

Older Posts

Tag: social sharing

Add Facebook, Twitter, Linkedin, Google+ & Pinterest Buttons to WordPress

Add Facebook, Twitter, Linkedin, Google+ & Pinterest Buttons to WordPress

Ok, you can probably do this easy with a plugin but I’ve over 50 active plugins on this site and it feels like an awful lot sometimes and can it affect the perforamce of my site. You can accomplish a lot of the tasks plugins achieve by using manual code in your template files and it gives you a bit more control over styling, position etc.. Among the easiest things to code into templates are Social Sharing buttons to allow people to share your posts on the big gun Social Networking sites like Facebook, Twitter, Linkedin and now Google+.

I’ll cut to the chase and give you the simple code below. All of these go into the “single.php” file most of the time at a position of your choosing either above or below the content:

Facebook Like Button

[html]
http://www.facebook.com/plugins/like.php?app_id=142128822547792&href=?phpechourlencode(get_permalink($post-ID));?&send=false&layout=button_count&width=95&show_faces=false&action=like&colorscheme=dark&font&height=21[/html]

Get your own Facebook app id from within your own account and plug it in above instead of mine. You can edit some of the parameters above too like width, height, colours, etc..

Tweet Button

[html]<a type="text/javascript" href="http://twitter.com/share&quot; data-count="horizontal" data-via="reverbstudios">[/html]

Put your own Twitter username in the ‘data-via’ parameter instead of mine.

Linkedin Share Button

[php]<script type="text/javascript" src="https://platform.linkedin.com/in.js"></script><script type="in/share" data-url="<?php the_permalink(); ?>" data-counter="right"></script>[/php]

Google+1 Button

[php]<g:plusone size="standard" href="<?php the_permalink(); ?>"></g:plusone>[/php]

And put this in your theme’s ‘footer.php’ file just above the closing tag:

[html]<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>%5B/html%5D

Pinterest ‘Pin it’ Button

[php]<a href="http://pinterest.com/pin/create/button/?url=&lt;?php the_permalink(); ?>&media=<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘thumbnail’ ); echo $thumb[‘0’]; ?>&description=<?php the_title(); ?>" count-layout="horizontal">Pin It</a>[/php]

And put this in your theme’s ‘footer.php’ file just above the closing </body> tag:

[html]<script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>%5B/html%5D

This Pinterest button code takes a post’s featured image to pin.

If you wrap the above codes in divs, you can style/position them quite easily. You can see how the buttons look and perform at the top of this post!

Happy Sharing.

Leon

Posted on May 4, 2012Categories How to Guides, Wordpress TipsTags facebook, google, linkedin, pinterest, social networking, social sharing, Twitter, wordpress2 Comments on Add Facebook, Twitter, Linkedin, Google+ & Pinterest Buttons to WordPress
Blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy