Support » Themes and Templates » wp_nav_menu()

  • Resolved cinematic

    (@cinematic)


    Hi, if I using a custom menu I can create a home link by adding a menu item with the siteurl. But how can I give it the attribute class=”current_page_item” if this menu item is active?

    In the earlier themes I could add <?php if (is_home()) { ?>class="current_page_item" <?php } ?>
    How can I achieve this with wp_nav_menu function if I don’t have a static front page?

    Thanks for any tipps

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘wp_nav_menu()’ is closed to new replies.