• Resolved TheDyke

    (@thedyke)


    Hi,

    I have a menu which shows:

    \parent\child\sub-child\

    When I click “sub-child” then that category gets the “current-cat” class. I also like to style the parents.

    How is that possible? Thanks in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter TheDyke

    (@thedyke)

    I added this in Template-functions-category.php and it seems to work:

    line 375, below the part: class=”current-cat”:

    $queried_obj = $wp_query->get_queried_object();
    if ($category->cat_ID == $queried_obj->category_parent) {
    $thelist .= ‘ class=”current-cat-parent”‘;
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Styling parent(s) of current-cat child’ is closed to new replies.