• I am using the Navigation menus in WordPress, via Appearance > Menus and would like the link for the active page to be highlighted. If I am on the Gallery page, the Gallery link has a different CSS style than it would on any other page. Can this be done, or would I be better to hardcode my menu into the theme?

Viewing 5 replies - 1 through 5 (of 5 total)
  • What theme are you using? Where did you download it from?

    Thread Starter Nathan Hawkes

    (@natehawkes)

    It is my own custom theme. The menus are inserted using the wp_nav_menu() function, so are generated by the WP system.

    By default, WordPress should be generating the classes you need. Try using Firefox with the Firebug add-on for this kind of CSS troubleshooting. Or use whatever developer tool is available in your web browser.

    Thread Starter Nathan Hawkes

    (@natehawkes)

    Oh, thank you. I knew WP created the CSS classes for me but I wasn’t aware of the ‘current-menu-item’ class. That is exactly what I wanted! Thanks!

    Thread Starter Nathan Hawkes

    (@natehawkes)

    Oh, thank you. I knew WP created the CSS classes for me but I wasn’t aware of the ‘current-menu-item’ class. That is exactly what I wanted! Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Selecting menu link in template using Navigation Menu’ is closed to new replies.