WordPress.org

Ready to get started?Download WordPress

Forums

Menu Link Highlighted For Current Page (3 posts)

  1. alanchrishughes
    Member
    Posted 2 years ago #

    I have no idea how it works, how your style sheet knows which page you are on, but I have these few lines of CSS that will highlight the page's link in my menu if you are on that page, as far as categories or custom post type posts, but for tags and WP generate pages it doesn't recognize it. This is the code I am using

    #access .current-menu-ancestor > a,
    #access .current_page_item > a,
    #access .current_page_ancestor > a,
    #access .current_page_parent {
    	background-color: #ddd;
    }
  2. ragzor
    Member
    Posted 2 years ago #

    link to the site might help

  3. alanchrishughes
    Member
    Posted 2 years ago #

    I'm just looking for the WP class for this, I'm surprised it isn't in the codex anywhere. But I discovered I was just missing

    .current-menu-item

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.