WordPress – simple links to share a post on…

For various reasons you sometimes don’t need or don’t want the JavaScript overhead that comes with the standard “Share On” buttons. I personally find those buttons annoying as they often take a lot of space on a page, are hard to style (alignment) and can be slow to load.

Here is a collection of HTML only links – the way they look in the content.php file of my WordPress template – that you can add to a WordPress post template for your readers to share on Twitter, Google+, Reddit, Flattr & Facebook.

the social media mess

Share on Twitter

<a href="http://twitter.com/home?status=Currently reading <?php the_permalink(); ?> @lroguet" title="Share on Twitter" rel="nofollow" target="_blank">Twitter</a>

Note: you probably want to change @lroguet with your own Twitter username.

Share on Google+

<a href="https://plus.google.com/share?url=<?php the_permalink(); ?>" title="Share on Google+" target="_blank" rel="nofollow">Google+</a>

Share on Reddit

<a href="http://www.reddit.com/submit?url=<?php the_permalink(); ?>" rel="nofollow" target="_blank" title="Share on Reddit">Reddit</a>

“Share” on Flattr

<a href="https://flattr.com/submit/auto?user_id=lroguet&url=<?php the_permalink(); ?>&title=<?php the_title(); ?>&language=en_GB&category=text" title="Flattr this post" target="_blank" rel="nofollow">Flattr</a>

Note: you probably want to change lroguet with your own Flattr username.

Share on Facebook

I don’t have a “Share on Facebook” link at the bottom of my posts because I believe that is not the audience I target with my blog (I might miss a couple of readers but I’m fine with that) but I could as well add one with this line of code.

<a href="https://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>" rel="nofollow" target="_blank" title="Share on Facebook">Facebook</a>

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>