WordPress.org

Ready to get started?Download WordPress

Forums

IF Current menu item AND a particular ID (2 posts)

  1. MultiformeIngegno
    Member
    Posted 1 year ago #

    Hi guys, I need to define some CSS for the current menu item AND if it corrispond to an X ID. For example it's #menu-item-249, and it's current.. it should be something like:
    .main-navigation .current-menu-item > #menu-item-249 a, .main-navigation .current-menu-ancestor > #menu-item-249 a, .main-navigation .current_page_item > #menu-item-249 a, .main-navigation .current_page_ancestor > #menu-item-249 a

    ..?

  2. MultiformeIngegno
    Member
    Posted 1 year ago #

    Solved :)
    If can help:
    .main-navigation #menu-item-249.current-menu-ancestor > a {...}

Topic Closed

This topic has been closed to new replies.

About this Topic