Skip to content

Instantly share code, notes, and snippets.

@scottnix
Last active December 26, 2015 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottnix/7077105 to your computer and use it in GitHub Desktop.
Save scottnix/7077105 to your computer and use it in GitHub Desktop.
Adding Menu to Thematic Theme Example
// 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