Skip to content

Instantly share code, notes, and snippets.

@WebEndevSnippets
Created January 4, 2014 15:03
Show Gist options
  • Save WebEndevSnippets/8256193 to your computer and use it in GitHub Desktop.
Save WebEndevSnippets/8256193 to your computer and use it in GitHub Desktop.
WordPress: Add New Menu Navigation with dynamic child category walker class
//* Add New Menu Navigation with dynamic child category walker class
add_action( 'genesis_after_header', 'webendev_subcat_navigation', 15 );
function webendev_subcat_navigation() {
echo '<nav class="nav-primary">';
wp_nav_menu(
array(
'container_class' => 'wrap',
'theme_location' => 'primary',
'menu_class' => 'menu genesis-nav-menu menu-secondary',
'walker' => new Submenu_Walker_Nav_Menu()
)
);
echo '</nav>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment