Skip to content
 

Displaying Category Names in WordPress

I just upgraded one of my blogs to WordPress 3.0 and found a bug (feature?) in my theme. The category name was missing from one column on the home page. I ended up changing this line:

single_cat_title();

to this:

wp_list_categories("include=$category&title_li=&style=none");

and all is fine again. Note: The double quotes on the second command are required. If you put single quotes, the $category variable will not be replaced.