preload
Jul 19

It is always a good thing to have as many readers as possible on your blog. To increase the number of readers it is important to make it easy for them to both follow your blog posts and share your posts on social networks.

I will show you how you very easy can add icons with links for rss feed, twitter, delicious, stumbleupon, technorati and digg.

I have chosen to have the RSS feed and Twitter icon on the top of my left side bar. This is how you do can do this in WordPress.

Insert in the very beginning of sidebar.php

<div style="text-align:center; padding-top:5px;">
<a href="YOURRSSFEEDURL"><img title="Subscribe to my feeds"
 src="RSSFEEDICONURL" alt="Subscribe to my feeds" /></a>
<a href="YOURTWITTERURL"><img title="Follow me on Twitter"
 src="TWITTERICONURL" alt="Follow me on Twitter" /></a>
</div>

The code snippet above will give the following result:
rss_twitter

I have chosen to have all other icons and links to social networks at the end of my posts so it’s easy to share the post with others. This is how it can be done in WordPress.

Insert this in the middle of the single.php

<div style="padding-top:10px; text-align:center;">
<a href="http://www.delicious.com/post?url=
<?php echo $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ?>&title=
<?php the_title(); ?>">
<img src="DELICIOUSICONURL" alt="Tag post in delicious" 
title="Tag post in delicious"/></a>

<a href="http://www.stumbleupon.com/submit?url=
<?php echo $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ?>&title=
<?php the_title(); ?>">
<img src="STUMBLEUPONICONURL" alt="Stumbleupon post"
 title="Stumbleupon post"/></a>

<a href="http://www.technorati.com/faves?add=
<?php echo $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ?>">
<img src="TECHNORATIICONURL" alt="Add to Technorati"
 title="Add to Technorati"/></a>

<a href="http://www.digg.com/submit?phase=2&url=
<?php echo $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ?>&title=
<?php the_title(); ?>">
<img src="DIGGICONURL" alt="Digg post" title="Digg post"/></a>  
</div>

The code snippet above will give the following result:

social_networks

I am using WordPress and of course I could have installed some plugins that would do this for me, but I like to do things like this my self so I get it just the way I want to :)

Follow me on twitter @PerOla

Share & enjoy
You can subscribe to my comments feed to keep track of new comments.

No Comments to “Adding icons with links to social networks on your (WordPress) blog”

2 Pingbacks to “Adding icons with links to social networks on your (WordPress) blog”

  1. […] on FacebookBookmark on DeliciousBookmark on Reddit!Video: Sunday Political Panels – 7/19/09 RSS Adding icons with links to social networks on your (WordPress) blog – breathingtech.com 07/19/2009 It is always a good thing to have as many readers as possible on […]

  2. […] of building, configuring and installing things li&#107&#101&#32Themes and Plugins. Adding icons with links to s&#111&#99&#105al networks on your (WordPress) blog – breathingtech.com 07/19/2&#48&#48&#57 It is always a good thing to […]

Leave a Reply

Subscribe to my comments feed

Subscribe to my feeds Follow me on Twitter
DZone MVB