Skip to content

Instantly share code, notes, and snippets.

@ahaywood
Last active December 10, 2015 22:58
Show Gist options
  • Save ahaywood/4505519 to your computer and use it in GitHub Desktop.
Save ahaywood/4505519 to your computer and use it in GitHub Desktop.
PHP: WP - Custom Wordpress Menu
<?php // CUSTOM WORDPRESS MENU
// IN FUNCTION.PHP
function register_menus() {
register_nav_menus(array(
'primary-menu' => __('Primary Menu')
));
}
add_action('init', 'register_menus');
// PLACE IN ACTUAL TEMPLATE
// wp_nav_menu( array( 'theme_location' => 'primary-menu' ) );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment