Dec
15
2008
Adding Social Bookmarking Links to WordPress
There are plugins that do this but once again, I’m a code junky and I love being able to go in and manipulate the code to get what I want. I just recently added some social bookmarking links at the top of this site, as you can see.
Here is the code I used in my header.php file to make them all work.
<a href="http://technorati.com/faves?add=<?php bloginfo('url'); ?>" target="_blank"><img src="<?php bloginfo('url'); ?>/images/technorati.png" alt="Add to Technorati" /></a> <?php if(is_home()) {?> <a href="http://digg.com/submit?phase=2&url=<?php bloginfo('url'); ?>&title=<?php bloginfo('name'); ?>&bodytext=<?php bloginfo('description'); ?>" title="Digg this story" target="_blank"> <?php } else { ?> <a href="http://digg.com/submit?phase=2&url=<?php the_permalink() ?>&title=<?php the_title(); ?>&bodytext=<?php the_excerpt_rss() ?>" title="Digg this story" target="_blank"> <?php } ?> <img src="<?php bloginfo('url'); ?>/images/digg.png" alt="Digg this story" /> </a> <?php if(is_home()) {?> <a href="http://del.icio.us/post?url=<?php bloginfo('url'); ?>&title=<?php bloginfo('name'); ?>" target="_blank"> <?php } else { ?> <a href="http://del.icio.us/post?url=<?php the_permalink() ?>&title=<?php the_title(); ?>" target="_blank"> <?php } ?> <img src="<?php bloginfo('url'); ?>/images/delicious.png" alt="Add to del.icio.us" /> </a> <a href="<?php bloginfo('url'); ?>/?feed=rss2"><img src="http://bavotasan.com/images/subscribe.png" alt="Subscribe to <?php bloginfo('name'); ?>'s RSS Feed" /></a> |
You can copy the images from my header and then change the bavotasan.com/images folder to point to your own.



It’s great to know those codes and design your page the way you want it to. It’s pain instructing someone how you want it to look and then not getting what you really want. I remember putting on those social bookmarking plug ins crowding at the bottom of my every post. I wish I can be like you.
Thanks for the information,it will come in quite handy for my site. Keep the info hot this helps people with business websites.
Visiting your Blog today. Thanks for this information. Pleased to meet you.
Thank you for this code. It’s very useful.
I was wondering how the WP template I have managed to add that to the header. Now I can experiment with different themes and still have my social bookmarking links highly visible. Thank you for sharing!
I am a freelance Internet marketing and I am a newbie in the business. Thanks so much for sharing this tutorial. I will surely apply it with my business. Do you have any other blog sites discussing stuffs like this? Please let me know.