I recently started working on a WordPress theme and found this utility. I'm currently using WordPress 4.7.4. I've made following modifications to my code,
In FUNCTION.PHP;
function mytheme_setup(){
register_nav_menus( array(
'side' => __( 'Side Menu', 'mytheme' ),
'social' => __( 'Social Links Menu', 'mytheme' ),
) );
$starter_content = array(
// Set up nav menus for each of the two areas registered in the theme.
'nav_menu' => array(
// Assign a menu to the "side" location.
'side' => array(
'name' => __( 'Side Menu', 'mytheme' ),
'items' => array(
'link_recent' => array(
'title' => _x( 'Recent Articles', 'Theme starter content' ),
'url' => site_url( '/#recent-articles' ),
),
'link_about' => array(
'title' => _x( 'About Us', 'Theme starter content' ),
'url' => site_url( '/#about-us' ),
),
'link_contact' => array(
'title' => _x( 'Contact', 'Theme starter content' ),
'url' => site_url( '/#contact-us' ),
),
),
),
// Assign a menu to the "social" location.
'social' => array(
'name' => __( 'Social Links Menu', 'mytheme' ),
'items' => array(
'link_facebook',
'link_twitter',
'link_instagram',
'link_youtube',
),
),
),
);
$starter_content = apply_filters( 'mytheme_starter_content', $starter_content );
add_theme_support('starter-content', $starter_content);
}
add_action( 'after_setup_theme', 'mytheme_setup' );
And, in FRONT-PAGE.PHP,
<?php if ( has_nav_menu( 'side' ) ) : ?>
<div class="navigation-side">
<nav id="site-navigation" class="main-navigation" role="navigation">
<?php
wp_nav_menu( array(
'theme_location' => 'side',
));
?>
</nav>
</div><!-- .navigation-side -->
<?php endif; ?>
But still, I can't find any starter content menus on my theme.