A place for opinions and notes of a valibuk.

Updating from Categories to Tags in WordPress

Tagged with: — ondrej at 12:47 am on Wednesday, November 28, 2007

I updated my WordPress installation to the version 2.3.x and found a new feature: tags.
I converted all my categories to tags (except the Uncategorized category) and… what I saw a small disaster :) All categories disappeared (an expected result), but the categories list in my sidebar contained only one, not very useful, item Uncategorized. Additionally a blog entry contained only Filed under: Uncategorized, again, not very helpful.

And then I realised – I have my own theme… arrrrgh…. and there is no tags to categories converter ;>
Well, here are steps how to update your own theme to support basic tags features:

1. Blog Entry
We are going to change from Filed under: Uncategorized to Tagged with: English • Photos • Travelling.

Open the wp-content/themes/YOUR_THEME/index.php file and change:

  1. span style=”color: #ff0000;”>"Filed under:"‘,’


  1. span style=”color: #ff0000;”>’Tagged with: ‘,‘ • ‘,

2. Sidebar
We are going to remove the obsolete categories list and replace it with a new shiny tag cloud:

Open the wp-content/themes/YOUR_THEME/sidebar.php file and change:

  1. <li id="categories"‘Categories:’


  1. <li id="categories"‘Tags:’

Actually, I decided for smaller font sizes:

  1. span style=”color: #ff0000;”>’largest=18′

Please, do not forget to click on [Show Plain Code] before copying source code.

For more details about the new commands see the version 2.3 announcement.
For more details about categories and tags see this apt blog entry: Tags Are Not Categories – Got It?.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • Reddit
  • Technorati
  • Furl
  • NewsVine
  • Slashdot
  • Ma.gnolia
  • StumbleUpon

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Comment Preview

commercial break :)

Make an account on -- a really good hosting where you have your own virtual machine. I installed Gentoo there = I like it very much ;)