Support » Themes and Templates » Home link in wp_ nav_ menu()

  • Hi, I am trying to figure out how to put a home link at the beginning of wp_nav_menu().

    If I include the function in my theme no home link is added (in opposite to the twentyten theme). I can’t add a li-tag as I usually did in earlier themes because wp_nav_menu() had it’s own wrapper.

    How is the home link included in twentyten?

    Thanks for any help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • well, if you are making a custom menu, just make a link called home set to your url…. you just make one in the menu creator

    if you are using the default page list and you don’t have a home link,

    function twentyten_page_menu_args( $args ) {
    	$args['show_home'] = true;
    	return $args;
    }
    add_filter( 'wp_page_menu_args', 'twentyten_page_menu_args' );

    added to functions.php will insert a home link

    Thank you very much for your helpful info! Works like a charme … 🙂

    How do I do this in another theme please?

    What .php file does this code go in please?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Home link in wp_ nav_ menu()’ is closed to new replies.