How To: Add Social Bookmarking Buttons
About a week ago, Arne Brachold wrote an interesting piece on creating links to social bookmark services. If you're looking to add buttons, or text links, which help users submit your posts to these bookmarking services you may want to give it a look.
One thing Arne doesn't mention, though, is how to get WordPress to do this automatically - something that is pretty popular. If you look towards the top of my article pages (pages where comments are available) you'll see an example of how I integrate these services.
Anyway - to get WordPress doing this automatically you really only need to use two of WordPress' Loop tags. One that pulls the pages URL, or permalink, and one that pulls the title. Just remember that these need to be placed inside the WordPress loop somewhere in order to work.
Helpful Loop Tags
<?php the_permalink(); ?>
//This function calls the post's URL
<?php the_title(); ?>
//This function calls the post's Title
If you look at Arne's code you'll simply replace the [URL] and the [TITLE] text with the appropriate functions above. These will form the 'href' value of your link, from there just add either an icon for the service or simply the text - just like any hyperlink.
Oh, one more thing - I recommend encoding the '&' by replacing each occurrence with '&' - this will make sure it validates cleanly.


