wp_nav_menu displaying all pages

As the title says, I'm using wp_nav_menu in header.php to load in the audience, secondary, and main menus and when I do, every menu contains every page - or at least many more pages than I selected for the menus.

I'm having the hardest time trying to make this work for some reason, so any help is appreciated. Here's the code to register the menus in functions.php:

// WordPress Menu Locations
function diviecommerce_setup() {
register_nav_menus(array(
    'primary' = esc_html__( 'Main Menu', 'diviecommerce' ),
    'audience' = esc_html__( 'Audience', 'diviecommerce' ),
    'secondary' = esc_html__( 'Secondary', 'diviecommerce' ),
    'footer ' = esc_html__( 'Footer', 'diviecommerce' ),
));
}
add_action('after_setup_theme', 'diviecommerce_setup');

And here's the code in the template:

div class=top
    ?php wp_nav_menu( array('theme_location' = 'audience', 'container_class' = 'audience' ) ); ?
    div class=header-right
        ?php wp_nav_menu( array('theme_location' = 'secondary', 'container_class' = 'account-cart' ) ); ?
        ?php et_show_cart_total(); ?
    /div
    /div
    nav?php wp_nav_menu( array('theme_location' = 'primary', 'container_class' = 'main' ) ); ?/nav

Topic functions menus Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.