Archives by Month

Support this Site!

You may have noticed that there's very little third-party advertising on this site. I'd like to keep it that way. Here's how you can help:

  • Buy my books. They're available at great prices on Amazon.com.
  • Check out my training videos on Lynda.com. It's a great source for "all you can eat" training.
  • Donate a few dollars. It'll help cover my hosting costs and give you a chance to tell me what you want to see covered here.
  • Comment on blog posts. You can help get a discussion going that can benefit others, making the site more valuable for everyone.

Adding Del.icio.us and Digg Links to Your WordPress Posts

Look, Mom! No plugins!

Although there are WordPress plugins that enable you to add links to bookmarking sites from your posts, if you’re just interested in a few sites and don’t want to deal with plugin overhead (or future compatibility), there is an easier way. Just add the links to your WordPress theme’s template file, inside The Loop.

The two bookmarking sites I’m interested in are Del.icio.us and Digg. I use Del.icio.us for bookmarking primarily because of its Daily Blog Posting feature, which I wrote about in my “Del.icio.us Links” article. (The terminology for the feature has changed since I wrote the article; it can now be found under Daily Blog Posting in the Settings area for your Del.icio.us account.) This feature displays a list of the posts I bookmark with Del.icio.us each day. You can find examples under This Just In… on my site.

I don’t regularly use Digg, but I do have an account. Digg got a lot of press a while back, but it appears to have become a popularity contest, with people promoting their own posts and voting for their friends. Still a lot of people use Digg, so it’s good to support it.

The links I added to my site enable a user to quickly bookmark a post on Del.icio.us or Digg. The visitor clicks one of the links and goes right to the appropriate page for entering the bookmark information. Finishing up on that page brings them back to your site.

Here are the two links; you can copy and past them into your template file, within The Loop:

<a href="http://del.icio.us/post?url=http://www.mariasguides.com/2006/12/21/adding-delicious-and-digg-links-to-your-wordpress-posts/&title=Adding Del.icio.us and Digg Links to Your WordPress Posts" title="Add this post to del.icio.us">Add to Del.icio.us</a>

<a href="http://digg.com/submit?phase=2&title=Adding Del.icio.us and Digg Links to Your WordPress Posts&url=http://www.mariasguides.com/2006/12/21/adding-delicious-and-digg-links-to-your-wordpress-posts/" title="Digg This">Digg This</a>

Obviously, the text that appears for the link can be completely customized for your needs. Ditto for the title attribute.

You can see an example on any post on my site, www.aneclecticmind.com. You’ll find the links at the bottom of each post, along with links for entering comments, printing the post, and a display of the number of times a post has been read:

Post Links

If you’re not sure what The Loop is or how to modify a template file, you need our book, WordPress 2: Visual QuickStart Guide. It devotes an entire chapter to modifying theme template files. You can learn more about the book on its companion Web site, www.wpvqs.com.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>