• Resolved Mihail Semjonov

    (@muxahuk1214)


    Hello, I’m using filter to add class to nav_menus and the problem is that these filter ads to every menu (for thous in widget to) classes.

    So what i’m trying to do is somehow to detect if navigation is from location ‘primary’ or from widgets..

    Could you help me with that ?

Viewing 1 replies (of 1 total)
  • Thread Starter Mihail Semjonov

    (@muxahuk1214)

    Found no solution via php how to do thet, but there’s some solution with css.
    I’v had to remove ‘active’ class from ‘current-page-ancestor’ only in widgets menu.. so what i did is:

    .widget_nav_menu ul li.active:not(.current-page-ancestor) {
        background: url('images/partitions-list-select.png') left center no-repeat;
    }

    And it worked for me )

Viewing 1 replies (of 1 total)
  • The topic ‘How to detect if nav items beeing displayed in widget or theme location ?’ is closed to new replies.