echo "hey, it works" > /dev/null

just enough to be dangerous

Posts with no category


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 under

The call to the function thecategory() 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 getthe_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 cat_name == 'Uncategorised')) { echo " under"; $category_url = get_option('siteurl') . '/category/'; foreach ($categories as $category) { echo " category_nicename}\">"; echo "{$category->cat_name}"; } } 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 thecategory builds automatically. Again, I'll ignore the terrible category method naming, some cat others category_.

WordPress 2.3, the Connections theme, and tags


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.

This is The Loop. You need to replace it with this code.

You need to make a similar change to single.php, category.php, date.php and search.php.

Finally, you need to edit post.php and add a call to thetags() somewhere. You can add it anywhere, depending on how you want the post laid out. I added thetags(', tagged ', ', ', ''); after the call to the_category().