Created
May 8, 2012 18:40
-
-
Save sguzik/2638364 to your computer and use it in GitHub Desktop.
Add this to functions.php to get your menus working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
| ------------------------------------------------------------------- | |
| Registering Top Navigation Bar | |
| ------------------------------------------------------------------- | |
| Adds custom menu with wp_page_menu fallback | |
| */ | |
if ( function_exists( 'register_nav_menu' ) ) { | |
register_nav_menu( 'main-menu', 'Main Menu' ); | |
} | |
/** | |
* Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. | |
*/ | |
function bootstrapwp_page_menu_args( $args ) { | |
$args['show_home'] = true; | |
return $args; | |
} | |
add_filter( 'wp_page_menu_args', 'bootstrapwp_page_menu_args' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment