Currently I'm making this menu: (Functions.php)
$menuname = 'Top Menu';
$menu_exists = wp_get_nav_menu_object( $menuname );
if( !$menu_exists){
$menu_id = wp_create_nav_menu($menuname);
wp_update_nav_menu_item($menu_id, 0, array(
'menu-item-title' => __('Programme'),
'menu-item-classes' => 'programme',
'menu-item-url' => home_url( '/programme/' ),
'menu-item-status' => 'publish'));
wp_update_nav_menu_item($menu_id, 0, array(
'menu-item-title' => __('Speakers'),
'menu-item-classes' => 'speakers',
'menu-item-url' => home_url( '/speakers/' ),
'menu-item-status' => 'publish'));
}
When I activate my theme, what I'm looking to do is:
(source: cubeupload.com)
Selecting the 'Primary Menu' box automatically so when I start this theme I create a menu and make it the primary menu.
How does one do this?