Site icon Hip-Hop Website Design and Development

wp_nav_menu() doesn’t work

I’m working on a theme with custom menus, currently using WP 4.0.1.

I’m registering two menus in functions.php:

register_nav_menus(
    array(
      'primary'   => __( 'Main Menu', 'wsy' ),
      'secondary' => __( 'Secondary Menu', 'wsy' )
    )
);

Then, displaying them in my header.php file:

<nav role="navigation">
    <?php
        wp_nav_menu(
            array(
                'theme_location' => 'primary',
                'depth'          => '1'
            )
        );
    ?>
</nav>

The problem is, when I select a specific menu from either the Menus page or the customizer, they stop showing up in my page. It doesn’t matter which menu or which location, they just don’t show up. When I reset the locations (choose “- Select -” from the dropdown) a default menu is shown.

WP_DEBUG is active, no errors. Tried it with WP 4.1, still nothing. Tried adding new menus, no luck. Tried with a single menu location and registering with register_nav_menu(); instead — nothing works.

I even tried on a fresh WP install, no luck. Also tried without the depth parameter, nothing.

I’d appreciate any help with this. Thanks!