Highlighting Current Category in the Archive and Feeds page
-
Hi,
I needed a category listing in my posts page and I want the current category to be highlighted. I enabled the ‘All’ category, so consequently, I want the ‘All’ also to be highlighted when I’m viewing the posts page. So I used the codex and got the following script running.
My script is:
`<cat>
<ul>
<?php wp_list_categories(‘show_option_all=All&hide_empty=0&title_li=¤t_category=All’); ?>
</ul>
</cat>`Do I have to run an IF conditional on my archive.php file to get the category ID and highlight it? How do I do it if the category is ‘All’ since the ‘All’ doesn’t exactly have a category ID?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Highlighting Current Category in the Archive and Feeds page’ is closed to new replies.