• I have custom menus on my site which utilize is_tax($taxonomy, $term(s)) to identify whether users are on specific taxonomy archive pages. A “current” class is added to the menu item if the taxonomy/taxonomy term matches the menu item (allowing me to highlight it).

    All was working great before the upgrade to 3.5, but my menu highlights no longer function after. I reverted my test site to 3.4.2, and everything functioned again.

    Has is_tax() been depreciated? If so, what is the proper conditional statement to identify specific taxonomy archive pages? Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Can you post your code?

    Thread Starter Jon Masterson

    (@jonmasterson)

    <?php if (is_tax('businesses', array('offices','the-offices','office-buildings'))) { _e( 'class="current-menu-item"'); } else { _e( ''); } ?>

    This example is representative of all items in this menu. If we’re on the taxonomy archive pages for “offices”, “office-buildings”, or “offices” (which are all taxonomy terms in the “businesses” taxonomy), it should show me some love and insert the “current-menu-item” class onto this menu item.

    Love is shown in 3.4.2, but 3.5 has no love for me. Yet. Thanks!

    Is this a bug with 3.5 ? I seem to have a similar problem.
    If it is a bug where does it get reported and is anyone looking at it ?

    I have managed to get round it using this

    $the_tax = get_taxonomy( get_query_var( ‘taxonomy’ ) );
    $my_tax=$the_tax->labels->name;

    Then I test the name.

    Thread Starter Jon Masterson

    (@jonmasterson)

    I actually found an error in my code. is_tax() works great! Sorry for any confusion!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘is_tax() no longer working after upgrade to 3.5’ is closed to new replies.