WordPress.org

Ready to get started?Download WordPress

Forums

Add items to Nav menu (1 post)

  1. babyskill
    Member
    Posted 3 years ago #

    add to your functions

    // Filter wp_nav_menu() to add additional links and other output
    function new_nav_menu_items($items) {
    	$homelink = '<li class="home"><a href="' . home_url( '/' ) . '">' . __('Home') . '</a></li>';
    	$items = $homelink . $items;
    	return $items;
    }
    add_filter( 'wp_nav_menu_items', 'new_nav_menu_items' );

Topic Closed

This topic has been closed to new replies.

About this Topic