Support » Themes and Templates » Marking the current page in navigation

  • Resolved theodorlindekaer



    Would you guys mind sharing your opinions on how to highlight the current selected page in the navigation bar.

    Fx when the user is on the page “Product” I would like “Product” to take another color.

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael


    Forum Moderator

    depends on your theme, and on which WordPress function is used to make the navigation; most of those functions output a ‘current-…’ css class;

    for example:

    My theme is using:

    <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’ ) ); ?>

    I am having a hard time understanding how it works and therefore how to highlight the selected page.

    Thank you for the link!



    Forum Moderator

    try for isntance:

    .current-menu-item a { color: red; }

    your theme might use some more specific formatting;

    what theme are you using?

    can you post a live link to the site?

    I see. When looking at the source code, I do see the current tabs having a “current class”. That is an easy way to solve my problem. Thank you!

    I am building my own theme on “Underscores”.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Marking the current page in navigation’ is closed to new replies.