Finally, native WordPress tagging

I am, admittedly, quite lax on keeping up with the latest version of things. So, it was with a bit of surprise that I happened to notice I had fallen behind on my WordPress version.

Partly due to it’s comparably solid track record, WordPress is usually the last of my open source softwares to get updated. However, when I heard the WP crew finally incorporated native tagging into the code, I cleared my schedule as it was time for an upgrade.

Why this wasn’t brought in earlier is anyone’s guess, but it did cause a handful of solid plugins to be developed that handled tags quite well (most notably the excellently named Ultimate Tag Warrior). But all that’s a thing of the past.

Basic Usage

Using a simple input directly below the post box on the Write page, you can quickly add tags to your entry. However, if you’ve an old template, you’ll need to add a tad of code into it to get things displaying properly.

To display tags you’ll need to add the following code anywhere in The Loop you wish to have the tags displayed:

<?php the_tags(‘before’, ’separator’, ‘after’); ?>

The options simply allow you to set text before, between and after the tags. An example of this would be:

<?php the_tags(‘Tags: ‘,‘ ~ ‘, ‘<br />’); ?>

This would output:
Tags: monkeys ~ freezers ~ garden tools

With a line break on the end.

Forecast: Cloudy

Also built into the new version is a Template Tag called wp_tag_cloud for adding a tag cloud to your site. This option allows for a number of additional settings (list style, maximum and minimum font sizes, number of tags in cloud, etc.), but very simply you can just add the following code to your template’s sidebar for some instant gratification:

<?php wp_tag_cloud(’smallest=8&largest=22&number=30′); ?>

This creates a tagcloud with the smallest (least frequently used) tags at a font size of 8pt, and the largest (most frequently used) tags a nice big 22pt. It also limits the number of tags in the cloud to 30.

Great, but why use it?

Tags add an additional way for you to classify the posts on your blog. Though this is generally the principle behind categories, tags allow for more ‘on the fly’ categorization.

Though WordPress allows you to (*irreversibly*) convert your categories into the new tags structure, I don’t advise it. What I suggest is keeping a category structure for larger topic areas and then using tags to further clarify what the post is about.

This works to keep the number of categories to a minimum (something a lot of bloggers need to learn to do!) while still allowing quick visual (click-based) searching of your content.

Backwards Compatibility

When I first heard that WP now had native tagging support I was a bit apprehensive, figuring that I’d have to go back and retag all my old posts under the new system.

Fortunately, this is not the case. The smart folks behind WP have included tag importers for the following tagging systems:

  • Ultimate Tag Warrior
  • Jerome’s Keywords
  • Simple Tags
  • Bunny’s Technorati Tags

To see what else is new in WordPress 2.3, to download a copy or get instructions on how to upgrade, visit the WordPress Version 2.3 page.

Filed under: Blogging, WordPress | | Written on October 8, 2007

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

PIGEONholed

RECENTLYspoken

  • Brian Said: How hard can it be to look at the address for the website you are logging into? To stop the virus...
  • Ryan Said: @Rob: Solid tip Rob - cheers for sharing. Didn’t even occur to me to use MySQL’s built in MD5...
  • Rob Mitchell Said: This is pretty easy using PHPMyAdmin if you have it. If you don’t, get it - it’s free,...
  • Sam L Said: Is there anyway to remove it once you have it?
  • Ryan Said: @Steven: Best thing for you to do is familiarize yourself with some basic SEO principles. Also look into a...

BLOGroll

PASTposts

BADGEpatch

Blog Directory - Blogged Internet Blogs - BlogCatalog Blog Directory
Copyright © 2008 Dao By Design, All Rights Reserved.