I'm a WordPress beginner working on a local server I set up with MAMP. I created the style, index, footer, header and functions docs, and PHP assembled everything with no problems. The website published all my files as expected. Then I tried to add custom menus to the appearance panel / menus in the admin dashboard, but they wouldn't show up.
Here's a snapshot of my folder hierarchy:
And here's a screenshot of the admin page:
And this is all the code in my functions.php file so far:
<?php
function macsc_script_enqueue() {
wp_enqueue_style('customstyle', get_template_directory_uri() . '/css/macsc.css', array(), '1.0.0', 'all');
wp_enqueue_script('customjs', get_template_directory_uri() . '/js/macsc.js', array(), '1.0.0', true);
}
add_action('wp_enqueue_scripts', 'macsc_script_enqueue');
function register_my_menus() {
register_nav_menus(
array(
'header-menu' => __( 'Header Menu' ),
'extra-menu' => __( 'Extra Menu' )
)
);
}
add_action( 'init', 'register_my_menus' );
I've read several stack overflow threads and consulted the WordPress Codex support documentation. The register_my_menus function was a direct copy and paste from the WordPress doc. As far as I can tell, I'm doing everything correctly (obviously not, of course).
One thing that seems odd to me is that there were already tabs for "widgets," "menus" and "header" in the Appearance panel. Considering this is a custom theme that started with an empty folder, I'm not sure why those are there at all.
Any help would be greatly appreciated.