Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6252

    Hi,

    On my menu, if I visit one of the main menu items, the menu item appears as a different colour while on that page.

    However, if someone is on a child of those pages (Roll over a menu item, and when the scrolldown appears, clicking on one of them) nothing changes, can I have the parent change colour when you visit a child item?

    #53472

    Hey,

    I can’t provide a solution for link hover effects because it would require a custom jquery function (as far as I know css doesn’t allow to style parent elements based on child element interactions – a jquery function would be required which checks the hover status of the child items and depending on the result you can apply classes to the parent item afterwards). However I can provide a solution for “static” menu items – you can use following code:

    .main_menu .menu .current-menu-parent a{
    color: #666666;
    }

    .main_menu .menu li.current-menu-parent a span{
    color: #666666;
    }

    #53473

    Thanks, that works really well for most child items!

    So there’s no way to make that happen to the portfolio, as in, my portfolio link turns a colour when you’re on a portfolio entry?

    #53474

    No – this is not possible because wordpress doesn’t know that the portfolio “overview” page is the parent page of the portfolio entry. I’ll talk to Kriesi – maybe we can use filters, etc. to implement this feature but I can’t make promises (whatsoever) at this point.

    #53475

    Hi!

    Unfortunately I cant think of a smart solution either at the moment. Will think about it, thanks for the suggestion :)

    Best regards,

    Kriesi

    #53476

    So there is no way to make the “portfolio” part of the navigation highlight when active?

    Is there anyway to point me in the right direction where I could figure this out? It’s much needed…

    Thanks!

    #53477

    Hey!

    If you are talking about highlighting the portfolio menu entry when you are on a portfolio single page: no thats simply not possible with wordpress :/

    Regards,

    Kriesi

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Colour parent menu item if visiting child item’ is closed to new replies.