How to make a ‘Digg this post’ link in WordPress

This tips applies to coding a WordPress theme design. You won’t be able to copy and paste the code straight into your posts. You will need full access to editing themes on your server (yes, I can host WordPress sites if you contact me).

This is quite tricky to do and still have your HTML validate.

<a target=”_blank” href=”<?php echo urlencode(get_permalink(get_the_ID())); ?>&amp;title=<?php echo urlencode(get_the_title(get_the_ID())); ?>”>Digg this post</a>
Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

Leave a Comment