Now that WordPress comes with tag support, you might have posts that you only want tagged and not categorised. To set that up in the Connections theme, you'll need to set up a category that you don't want displayed (I used 'Uncategorised' and no, I don't live in America, thank you), and edit post.php.

If you enabled tags by following my instructions for enabling tags in Connections, you'll have some code like this:Posted by <?php the_author(); ?> under
<?php
the_category(' ');
the_tags(', tagged ', ', ', '');
edit_post_link(' (edit)');
?>

The call to the function the_category() outputs a link to the category page for each category under which your post is filed. To output categories conditionally you don't want to output them directly, so you need to use the get_the_category function, which returns an array of category objects. I'll ignore the fact that the function calls should really be plural. Replace the code above with the following code.Posted by <?php the_author(); ?>
<?php
$categories = get_the_category();
if (!(count($categories) == 1 &&
$categories[0]->cat_name == 'Uncategorised')) {
echo " under";
$category_url = get_option('siteurl') . '/category/';
foreach ($categories as $category) {
echo " <a href=\"{$category_url}{$category->category_nicename}\">";
echo "{$category->cat_name}</a>";
}
}
the_tags(' tagged ', ', ', '');
edit_post_link(' (edit)');
?>

Unless there's only one category and it's the one you don't want to display, you want to output the categories. Basically, you need to manually build what the_category builds automatically. Again, I'll ignore the terrible category method naming, some cat_ others category_.

I've just upgraded to WordPress 2.3 and, while the process was pretty painless, for some reason tags weren't working, even after I added tag support to the theme using the_tags() in The Loop. The problem turned out to be that The Loop in the Connections theme uses deprecated function calls. To enable tagging in the Connections theme edit index.php and find the following code. <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?> <div class="post"> <?php require('post.php'); ?> <?php comments_template(); // Get wp-comments.php template ?> </div> <?php endforeach; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ...
[read more]