Upgrading to WordPress version 2.3 will give you tags. But, all that taggy goodness will be invisible unless your theme has tag support built in. The Connections theme (currently in use here) has not been modified by the author since 2005, so it is blissfully unaware of tags. Getting basic tag support should be as easy as inserting a the_tags template tag in an appropriate place–I added it near the end of post.php. Unfortunately, this didn’t work. Fortunately, a post on in the WP support forums put me onto the path.

Older versions of WordPress themes used the following code to start The Loop:

< ?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>

As of WordPress version 1.5, the beginning of The Loop changed to:

< ?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

By now, you’re probably wondering what this has to do with tags. Be patient, here it comes. the_tags does not display anything when used inside the start_wp function. This is easily remedied by changing start_wp() to the_post(). So the beginning of your Loop should look like this:

< ?php if ($posts) : foreach ($posts as $post) : the_post(); ?>

Once this change is made, your tags should show up as expected. In the case of the Connections Theme, you’ll need to make this modification to the following files:

  • category.php
  • date.php
  • index.php
  • page.php
  • search.php
  • single.php

At some point, it would be a good idea to go through this theme and get rid of any deprecated functions–such as start_wp. But, the above steps will get you tagging right away and you can really fix the theme at a later date.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.