Last active
December 26, 2015 02:18
-
-
Save scottnix/7077105 to your computer and use it in GitHub Desktop.
Adding Menu to Thematic Theme Example
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
// reference http://thematictheme.com/forums/topic/trouble-getting-custom-menu-to-display/#post-3804 | |
// register two additional custom menu slots | |
function childtheme_register_menus() { | |
if ( function_exists('register_nav_menu')) { | |
register_nav_menu('contact-menu', 'Contact Menu'); | |
} | |
} | |
add_action('init', 'childtheme_register_menus'); | |
// add additional contact menu function | |
function childtheme_contact_menu() { ?> | |
<div id="access2"> <?php | |
if ( has_nav_menu( 'contact-menu' ) ) { | |
wp_nav_menu( array( 'theme_location' => 'contact-menu', | |
'container_id'=>'contact-menu', | |
'container_class' => 'clearfix', // add additional classes on the container | |
'menu_class' => 'sf-menu', // add additional classes on the menu, adding the "sf-menu" causes dropdowns and styling on the original access menu to be enabled, remove it if you don't need them | |
) ); | |
} | |
?> </div> <?php | |
} | |
add_action('thematic_belowheader', 'childtheme_contact_menu', 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment