Update: I forgot to mention that you must hack a core file and adapt your theme, too. See the end of the article.
Upgrading to WordPress 2.2 bleeding edge is an adventure, always. Not necessarily because they introduce new bugs–it’s the new features that are sometimes worrying. When one svn up changed all the feeds from somewhat-valid RSS to invalid Atom, I didn’t complain because, hey, it’s the bleeding edge, and Atom is so much better anyway. I just fixed the bug, and it was good. (In retrospect, I should have sent a patch. I forgot.)
Having tagging functionality in the WordPress core is a good idea, too. In general. Basically. However, if there already exists a widely-deployed tagging plugin–and for WordPress, one very much does exist–it may be a good idea to look at the functionality and semantics of the existing plugin before reinventing the wheel, badly.
UTW has a function named is_tag()
. WordPress 2.2 adds a function of the same name. Ergo, things break. Renaming the plugin dir helps, but your tags are gone. Re-activating the plugin shows you the shiny new plugin sandboxing (which, btw, Habari started in January), but doesn’t bring you back your tags.
Some searching might point you to the UTW tags importer (Options > Import > UTW). After a funny message about deleting unwanted tags from the UTW management page (hey, no plugin, no options page, okay?), the import kinda works. The “Did we say 5 steps? We meant 4. Ha ha ha.” joke is getting pretty old pretty fast, though. Then, instead of the UTW_ShowTagsForCurrentPost()
function, you use the_tags()
in your template. Of course, the semantics of the_tags()
are slightly different from those of the_category()
, and completely unlike the old UTW functions semantics.
So I decided to get UTW back. Despite claims to the opposite, the changes required are actually pretty simple: open ultimate-tag-warrior.php
and search for occurrences of is_tag(
. Replace all occurrences with UTW_is_tag(
. Activate the plug-in.
Update: Do the same in your theme – where you use is_tag()
now, change it to UTW_is_tag()
. Then, open wp-includes/rewrite.php, search for the function get_tag_permastruct
, and add return false;
directly after the opening brace. (This unbreaks /tag/ pages.)
Done.