Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
// In functions.php
function register_custom_menu() {
register_nav_menu('new-menu',__( 'New Menu' ));
}
add_action( 'init', 'register_custom_menu' );
?>
// In theme php
<?php wp_nav_menu( array( 'theme_location' => 'new-menu' ) ); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment