Created
October 18, 2012 05:21
-
-
Save scottnix/3909999 to your computer and use it in GitHub Desktop.
Thematic Two Access Menus in Header
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
// register two additional custom menu slots | |
function childtheme_register_menus() { | |
if ( function_exists('register_nav_menu')) { | |
register_nav_menu('secondary-menu', 'Secondary Menu'); | |
register_nav_menu('tertiary-menu', 'Tertiary Menu'); | |
} | |
} | |
add_action('init', 'childtheme_register_menus'); | |
///Top Menu (optional) | |
function childtheme_access2() { ?> | |
<div id="access2"> <?php | |
if ( has_nav_menu( 'secondary-menu' ) ) { | |
wp_nav_menu( array( 'theme_location' => 'secondary-menu', | |
'container_id'=>'secondary-menu', | |
'container_class' => 'clearfix', // I would remove this and add the clearfix through CSS, but I use SASS/Compass to make this easy | |
'menu_class' => 'sf-menu', // class for dropdowns | |
) ); | |
} | |
?> </div> <?php | |
} | |
add_action('thematic_header', 'childtheme_access2', 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment