I’ve grown to love the concept of a dynamic categorization system like the tagging capable with both del.icio.us and Flickr, so it would be only natural to do this with Wordpress, right?
After looking online for a suitable plugin to perform this task, I decided to write one myself—without hacking the core files. This proved to be a rather touchy subject to handle properly, but I ultimately prevailed. Until a more natural mechanism is built into the Wordpress core, I think my plugin, WP-Tags, shall suffice.
Download WP-Tags v0.1.
ToDo
- Edit the feed’s dc:subject fields without hacking the wp-atom.php and wp-rss2.php files directly (preferably with filters).
[Edit: This was only tested on v1.5-alpha-3 of wordpress.] — 13 Feb 2004

This is neat, but how is it different from using categories in WP?
You do not have to worry about if the tag currently exists in the table to categorize something. And if you think that you need another keyword to tag the post, you can just make one up on the spot without having to go through the trouble of creating another leaf on that tree-like category structure. Have you used del.icio.us or Flickr before?
Tags en wordpress
Tags para wordpress, las folksonomias llegan a los weblogs?
I’m new to the WordPress system and feeling a bit daft, though am very excited about this plugin as it’s exactly what I’ve been looking for. With WordPress v1.2.2 and Kubrick v1.2.6 up and running I haven’t been able to locate files mentioned in your instructions, archive.php and page.php, to alter in order to get the tags to work — have I simply overlooked them in one of the directories or is there somewhere else I should be altering that you may point me to?
Thank-you for your help.
I should probably have mentioned that this was running on version 1.3-alpha-5, and I’m not quite sure what else it works in—though I presume v1.5 since they are quite close, but not v1.2.x because of the significant overhaul.
Has anyone been able to confirm that this particular plugin works with WordPress 1.5?
Umm…I upgraded my site and it still seems to work (and I wrote it!).
does this plugin play nicely with technorati? I like how the plugin “technorati tags” for wordpress works, but really like that you can see all posts with each tag.
It doesn’t explicitly set technorati tags because I was able to coerce the RSS and Atom feeds to replace any categories in the output with the tag names (though you may wish to check on that yourself). Technorati will just index the tags like they already do with categories.
(Maybe) stupid question… how do you add tags to a post?¿ A custom field or something ?¿
Add a custom field named “tags” and then the field value is a space-separated list of tags (like del.icio.us).
Is it possible to hook tags together like you can on del.icio.us? For instance, if I have posts about lasers and posts about dna, could I have a feed for posts that are tagged posts+dna like beelerspace has mentioned in his awesome tutorial on maximizing del.icio.us usage?
Yes, the + operator works with this plugin just like with del.icio.us. You have to manually add it to the address bar however.
For example: http://chaotic.nexusvector.net/tag/life+time
Would this work with the heatmap plugin? Or should I just wait for a plugin that allows us to generate categories through an open text field on the post page… :)
Ever thought about simply using the categories to store the tags instead of using the meta data?
I tried to fake the tagging with categories, but I didn’t want to have to create a new textfield in the admin interface unless necessary. I also had issues trying to figure out a way to implement tagging that resembled what happens on del.icio.us and what I wrote for Quoth with the fewest lines of code.
If I had done it with categories, I’d need to dynamically create and destroy them (potentially) with each post edit. In my head, I could see that the category IDs would start to run away to infinity. There was also the problem with having tag-like slugs to use as unique identifiers for the categories, when the categories can have potentially non-unique names (since the uniqueness is handled by the IDs).
This plugin was just a weekend hack that turned out to work pretty well for what I needed.
i really dig del.icio.us and the whole idea of adding the tagging ability to my posts in wordpress, and i seem to have it all set up and working… but how did you get the tags to display in your posts below the title?
In the plugin file, there should be a list of function calls that the plugin provides. One of these is a call to the_tags(‘, ‘). This is the call that you add to generate the list of tags.
I’m an awful programmer. But I would love to see this plugin work along with this other one. That would be soooo great.
I don’t have an archive.php or page.php file…
How am I supposed to use this plugin?
Thanks!
Also, there is no function called the_tags(‘). There is one called the_tag()..is that what you mean?
Hi Richard. You wrote:
Yes, the + operator works with this plugin just like with del.icio.us. You have to manually add it to the address bar however.
I tried installing your plug-in (v0.5) on my blog powered by WP 1.5. Anyway trying to intersect two tags gives a page not found error.
What have i missed? Have you got any idea?
Thank you very much
Jon: Regarding the certain php files, my instructions assumed that you were using a Kubrick-derivative or one of the newer templates. You are right, I spelled the name of the function wrong, it is: the_tag().
Emanuele: Wow, I guess I didn’t look at my own code well at all. Upon inspection, the tag-intersection behavior that I was seeing was purely a random coincidence. Oh well. I might have to see how hard actually writing that bit would be…
I’ve sent you by e-mail a modified version of your plug-in that supports for tags intersection (i.e ia+xfolk).
Please have a look. An example on my blog at
http://www.infospaces.it/wordpress/tag/ia+xfolk
We need an idea to make it faster!
Emanuele
A nice feature could also be, making tags in search results clickable.
For example in this page making “life” and “time” clicable:
http://chaotic.nexusvector.net/tag/life+time
Emanuele
Not sure if you consider this a bug, but when I use get_tags() in my template, it will display tags for posts that have not been published yet, so clicking on them gives a 404 since no posts are (yet) available. This makes it difficult to tag drafts or tag scheduled posts without breaking things.
I downloaded your WP-Tags plugin, but I don’t see a way that if I create a post, then I can create a tag with it and then it shows all posts with that tag.
[…] Now theres a WordPress plugin that supports tags as well it would be great to be able to click on one of your tags and have it pull in all your blog posts, pictures from flickr and delicious links tagged with the same word(s). […]
When I try to download the script I get an db error.
So it turns out that Apache started doing something by default that I didn’t realize. Even though I had renamed my wp-tags .php source file to .php.txt, it was still trying to execute the php code within. I fixed it by creating a .htaccess file in the root of the /download/ folder that contained: “AddHandler text/plain .txt” to explictly tell Apache to do what I wanted…again.