WordPress.org

Support

Support » Themes and Templates » [Resolved] Marking the current page in navigation

[Resolved] Marking the current page in navigation

  • Hello,

    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)
  • Moderator Michael

    @alchymyth

    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: http://codex.wordpress.org/Function_Reference/wp_nav_menu#Menu_Item_CSS_Classes

    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!

    Moderator Michael

    @alchymyth

    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 ‘[Resolved] Marking the current page in navigation’ is closed to new replies.