Upgrading to WordPress 2.3 and the New Built-in Tagging Feature

I’ve barely completed an upgrade to WordPress 2.3. Out of many new improvements, one which stood out to me is the integrated tagging support. No longer, is it necessary to download one of the many tagging plugins.

Some things I noticed during the upgrade:

  1. My existing tagging plugin broke at the time of the upgrade. I found, after searching on Google, that some of the database schema that most tag and link plugins depend on was removed. (wp_post2cat et. al.) Simply disabling my two plugins for Simple Tagging fixed the database error message at the top of the pages
  2. WordPress has importers for a lot of tagging widgets. All I had to do was go to the “Manage” tab and choose “Import”. Importing the tags worked flawlessly.
  3. The new tag cloud widget applies unique styles to each tag. They are in the format < a class=”tag-link-$tag_id” … >. To get around the tags not having a style, I modified my style sheet and added color and link styles to the container div that the tag widget is in.
  4. I had to modify my page template to print a list of tags at the bottom of each post. There is a pretty good reference for that here.

My New Bookmark Widget

Ok, I found a widget that could replace the bookmark widget by simply allowing a customizable interface to the wp_list_bookmarks function. This is a highly customizable function that not only lets you grab all the bookmarks, but allows customization of how they are displayed. The widget gives you an interface that lets you change parameters to the function without having to modify the template.

My 1st attempt at using the widget didn’t work. After examining the HTML, I realized that there were a few tags I needed to not leave at the default. I got the links to work how I want making the following modification in my functions file of the theme I’m using.

function widget_mytheme_blogroll() {
?>
-<h3>Blogroll</h3>
- <ul>
- <?php get_links(-1, '<li>', '</li>', ' - '); ?>
- <?php
+ wp_list_bookmarks('title_before=<h3>&title_after=</h3>&category_before=&category_after=');
- </ul>
-<? php
} ?>

This gave me the category tree and also changed the titles of the categories to be in the same format that the rest of the template was in.

Now that I’d figured out which parameters were of importance to me, I gave the link widget another go. I found that the reason I was having problems is that the category_before and category_after parameters are always displaying <li>,</li> respectively instead of my desired blank setting. I tried spaces, &nbsp; and even random strings. Nothing seemed to work so I went back to my hacked template function instead. Oh well, I guess I can hack additional themes not that I’ve got the basics of what I want down. It’d be nice to get that working in the widget though.

Categories vs Tags

I found a couple plugins that make the tag and category features function the way I’d like.

  • Simple Tagging
    This plugin allows each post to have an associated set of tags. This enables a clean category system while still being able to show the subjects that each post talks about.
  • Simple Tagging Widget
    This widget Enables a cloud view of the tags in the sidebar.