Set current menu item based on post tags (1 post)

  1. benjudy
    Posted 4 years ago #

    I'd like to tweak my navigation menu so that the current-menu-item class is applied to a particular menu item based on tags added to the current post.

    In other words, when I am viewing a single post, I want to trigger menu item 'foo' to appear active if tag 'bar' is applied to the post.

    I'm pretty sure this is possible via adding the right code to my functions.php, I just can't figure out how.

    This is on my child theme to Scherzo, on WP 3.3.2.

Topic Closed

This topic has been closed to new replies.

About this Topic