Highlight Category Tabs?
-
Hi,
I’ve been searching the forums on this one for a few hours, but I’m just going round in circles. I’m sure there’s a quick solution if you know PHP.
I’m currently setting up horizontal tabs for my largest categories. You can see an example live on my site.
But as you can see, the category tabs (in this case, “MySpace” and “YouTube”), don’t highlight when you visit them. The code looks like this:
<ul id="nav">
<li <?php if (((is_home()) && !(is_category())) or (is_single()) or (is_paged()) or (is_search())) { echo "class=\"current_page_item\""; } ?> ><a href="<?php echo get_settings('home'); ?>" ><?php _e('home'); ?></a></li><li <a href="http://mashable.com/category/myspace" ><?php _e('MySpace'); ?></a></li>
<li <a href="http://mashable.com/category/youtube" ><?php _e('YouTube'); ?></a></li></ul>
It seems to me that I could just put in more conditions, specifying the category number to be highlighted (is_category), but I just can’t make it work. Any ideas?
PS. Please post the full code – my PHP skills aren’t exactly l33t. 🙂
The topic ‘Highlight Category Tabs?’ is closed to new replies.