I have a nav which I would like to detect if it should an li should have a class of active or not.
I usually do this for a normal page like so:
<li <?php if ( is_page('about')) { echo ' class="active"'; } ?>>
<a href="<?php bloginfo('url'); ?>/about">About</a>
</li>
However im doing this on a taxonomy page and I would like to detect the name of the taxonomy term. So I have 4 terms, design,illustration,motion photography. How would I go about adding a class to the li of the active taxonomy term?
Here is what I have so far but its wrong:
<li <?php if ( is_taxonomy('illustration')) { echo ' class="active"'; } ?>><a href="<?php echo site_url(); ?> /talcat/illustration">Illustration</a></li>