I'm following an udemy tutorial and can't see where I'm going wrong. The menu is not showing up in WP admin's Menus. In the tutorial, they add this code, then click customize>menus and it's listed with the other menus (the tutorial used wptest.io to fill out the site). I have those but not 'Main menu'. Can you see an error? What should I check next?
style.css
/*
Theme Name: My Sandbox Theme
Author: me
Author URI: https://me.com
Description: This my sandbox site
Version: 1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mysandbox
Tags: blog, one-column, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready
Maecenas mi ipsum, blandit ac diam eget, tincidunt auctor augue. Sed maximus elit quam, eget fermentum leo dignissim id. Aliquam molestie lectus et tortor sodales, vitae accumsan nibh placerat. Fusce ultricies congue felis in facilisis. Suspendisse porttitor dictum eros, sit amet hendrerit velit l
*/
functions.php
<?php
// Add theme support
add_theme_support( 'title-tag');
add_theme_support( 'post-thumbnails' );
add_theme_support( 'post-format', ['aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat']);
add_theme_support( 'html5' );
add_theme_support( 'automatic-feed_lnks' );
add_theme_support( 'custom-background' );
add_theme_support( 'custom-header' );
add_theme_support( 'custome-logo' );
add_theme_support( 'customize-selective-refresh-widgets' );
add_theme_support( 'starter-content' );
// Load in our CSS
function wphierarchy_enqueue_styles(){
wp_enqueue_style( 'main-css', get_stylesheet_directory_uri() . '/style.css', [], time(), 'all' );
}
add_action( 'wp_enqueue_scripts', 'wphierarchy_enqueue_styles' );
//Register Menu Locations
register_nav_menus([
'main-menu' => esc_html__('Main Menu', 'myfirsttheme'),
])
?>
index.php
<?php get_header(); ?>
<h1>Index.php</h1>
<?php get_footer(); ?
header.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
footer.php
My Footer <?php echo date('Y'); ?>
<?php wp_footer(); ?>
</body>
</html>