Highlight the current category of wordpress

December 29, 2008 · Print This Article

Most wordpress readers like to know where they are on a website.

To help them knowing what they’re exactly browsing right now, you should definitely highlight the current category. It is very easy to do.

When you’re browsing a category, WordPress automatically add a current-cat css class to the <li> element.

So the only thing you have to do is to edit your style.css file and add a style for the current-cat class:

#nav .current-cat{
background:#999;
color:#222;
text-decoration:underline;
}

Now your wordpress readers will know exactly what they’re browsing right now.


Your choice for site templates and wordpress themes

Comments

Got something to say?

You must be logged in to post a comment.