Skip to content
Permalink
Browse files

Register a navigation menu and add it to the default header template

  • Loading branch information...
corenominal committed Nov 29, 2015
1 parent dffc8d7 commit 3b8113eefca0dcbbd1e9bccb6669596fc14ca9a1
Showing with 25 additions and 0 deletions.
  1. +5 −0 functions.php
  2. +13 −0 functions/menus.php
  3. +7 −0 header.php
@@ -4,6 +4,11 @@
* ========================================================
*/
/**
* Register navigation menus.
*/
require get_template_directory() . '/functions/menus.php';
/**
* Include random stuff that does not fit elsewhere.
*/
@@ -0,0 +1,13 @@
<?php
/**
* Register navigation menu
* ========================
* Call this inside header templates with:
* wp_nav_menu( array( 'theme_location' => 'header-menu' ) )
*/
function corenominal_header_menu()
{
register_nav_menu('header-menu',__( 'Header Menu' ));
}
add_action( 'init', 'corenominal_header_menu' );
@@ -20,4 +20,11 @@

<p><strong><?php bloginfo('description'); ?></strong></p>

<?php
/**
* The header menu
*/
wp_nav_menu( array( 'theme_location' => 'header-menu' ) );
?>

</header>

0 comments on commit 3b8113e

Please sign in to comment.
You can’t perform that action at this time.