Add to Delicious Plugin

Download plugin: Add To — Version 1.0 (Oct 12, 2006)

Having recently overhauled the website and converting to WordPress, I prefer to find plugins for whatever it is that I need and take the path of least resistance. I wanted a plugin that would simply add an “add to” link to my posts and found a plugin but it turned out that the plugin used the title of the blog rather than the post title for posting to I set off to hack but saw the code was nearly a 100 lines and used JavaScript which is totally unresourceful. Just to experiment I wrote a plugin and turns out it only takes three lines for the plugin:

function delicious_link($linktext = 'add to') {
	global $post;
	if ($post) {
		echo '<a href="'.$post->guid.'&title='.$post->post_title.'">'.$linktext.'</a>';


To insert a link to delicious you simply need to download the plugin file, unzip the add-to-delicious.php file and upload it to your wp-content/plugins folder. Activate the plugin from WordPress administration and add the following code inside the while loop:

<?php delicious_link(); ?>

which will output a link with text add to Alternately, you can pass in your own link text if you want:

<?php delicious_link('add this page to'); ?>

In case you are wondering, the while loop is in your themes folder and starts off like this:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

This plugin is so trivial I am not sure why I’m posting it but someone will probably find this useful anyway. For what it’s worth you can just add the following in your While loop and not have to use the plugin:

Post to: <a href="</a>

Add this page to