• How do I set a button to be highlight when on a page?
    If I have a menu of Home, About and Contact and click About, then the About button should have a different style to indicate that I am on that page by being highlighted or change color or whatever…

Viewing 3 replies - 1 through 3 (of 3 total)
  • That’s done in the CSS code – specifics depend on your theme/site.

    Thread Starter egilarntzen

    (@egilarntzen)

    Sorry, forgot to mention, working on the Twenty Twelve Theme…

    But I do customize themes sometimes as well, so would like to know how in general.

    Make sure you are using a child theme for modifications so they are not lost when WP is updated.

    In twentytwelve, you can use the theme’s current_page_item CSS class to add CSS to highlight a current page item – something like:

    @media screen and (min-width: 600px) {
        .main-navigation .current-menu-item a {
             background-color: red;
    }
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Make button state stay on page’ is closed to new replies.