Thursday, November 10, 2011

How to Show Home Link In wp_nav_menu

WordPress wp_nav_menu function is really helpful to display a custom navigation menus in your wordpress theme. The custom menu can be set in the admin area, easily, with a drag-and-drop interface
You can use the code below as the solution:

function my_page_menu_args( $args ) {
 $args['show_home'] = true;
 return $args;
add_filter( 'wp_page_menu_args', 'my_page_menu_args' );
Put the code in the theme function.php

No comments:

Post a Comment