Categories Listing with “selected” category highlighted

The WordPress Codex for the wp_list_categories tag is actually pretty helpful here – WordPress is already assigning a class to the < li > tag of the current category.

At that point you just need to add an entry to your theme’s .css file to apply whatever highlighting you want to that class.

For instance:

li.current-cat { 
background: #CCC; }

Should give you a nice grey background.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)