WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_nav_menu() (2 posts)

  1. cinematic
    Member
    Posted 4 years ago #

    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

  2. cinematic
    Member
    Posted 4 years ago #

    oh ... suddenly it has a current_page_item class. Must have been blind ... :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.