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:
The options simply allow you to set text before, between and after the tags. An example of this would be:
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:
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.