SEO Services  Kent London and West Sussex – Yack Yack SEO

Add value to your WP blog posts with digg dugg

Add value to your WP blog posts with digg dugg

The other day I added digg dugg to my list of plugins. Its pretty cool I like it. I was looking at a way of pulling in some related material to tag on to the bottom of my blog posts. I wanted to be able to plugin a keyword and pull posts from somewhere based upon whatever that word was. I looked at the digg duggplugin and thought cool, that might well work.
I couldn’t see a way of adding db variables straight off the bat into the digg dugg function, so after a little bit of fannying around with single.php I came up with this approach. (I may have missed something and wasted the past hour or so doing this, but what the hey, it works, Im happy)

If you want to display upcoming digg posts using the 1st tag that you used for your blog post. Then here is how you can do it.
After installing and activating the digg dugg plugin.
Pull out single.php from your wordpress blog theme.

In between the comments_template() and the endwhile lines place the code as shown.

<?  comments_template();
function get_string_between($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
$mytags= get_the_category_list($separator, $parents);
$mystring = get_string_between($mytags, '">', '</a>');
echo"Top 5 upcoming $mystring related Digg Stories";
dd_diggdugg('', 5, 1, $mystring, 'upcoming');
endwhile; ?>

Save it, upload it. Thats it. Done.

Your posts will now fetch the last 5 or whatever number you wish to specify upcoming posts relative to the 1st word you used to tag your original post.

Optional. You could also edit the digg dugg plugin which incidently has a bunch of cool features. and add the nofollow link option. In diggdugg.php just look for instances of a href type links and add rel=nofollow inside the tags.

Rob Watts
Kickstart your business today - Get an SEO Consultation or just talk to Rob about your online aspirations. With over 20 years experience in building traffic he's pretty much encountered most markets and scenarios

2 thoughts on “Add value to your WP blog posts with digg dugg

  1. robwatts Post author

    Its a certainly a way of supplementing your existing content. Sometimes though there aren’t any stories, so I need to find a way of checking to see if a story exists and then insert a different kw if one doesn’t.

    Hat can be purchased in accessorize in the UK, gotta be accompanied by ones 12 yr old daughter though 😀

Leave a Reply

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

%d bloggers like this: