• Does wp get archives not have a li.current like cat’s and main nav has?

    I have <?php wp_get_archives( $args ); ?> ut when i click on say December the current nav doesn’t kick in like it does with the main nav and cats nav.

    Any idea or can it not do it?

Viewing 1 replies (of 1 total)
  • If anybody wants to show current item as highlighted then I managed this via a simple jQuery on the page so I could pass a php variable to it:

    <script>
    jQuery(document).ready(function($) {
    // Iterate over each link in the list
    $('#tabnav ul li a').each( function() {
    // If the link has an title of current year then add class
    var $currentYear = (new Date).getFullYear();
    var $val = $(this).attr("title")
    if($val==<?php echo $year?>) {
    // Add the class
    $(this).addClass('current');
    }
    });
    });
    </script>
Viewing 1 replies (of 1 total)
  • The topic ‘wp get archives not have current li css?’ is closed to new replies.