• Hello! I have a site with a certain page structure. In the Menus section of the admin panel, I have *no* created menus. Still, the top menu of the site shows the whole page structure of the site.

    It is as if a “Pages” widget was added to the top menu somehow.

    Looking at the code of the theme, in header.php there’s this line:
    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu' ) ); ?>

    However, I do not have a primary-menu created. So it has to come from somewhere. My question is where in the code it gets created and can I influence it somehow?

    What I like about that menu is that it’s dynamic, meaning I don’t have to maintain it, it updates itself when I remove pages or move them around. However, I’d like to know how can I change its behavior – for example allow up to 2nd level of depth, exclude certain pages, etc.

    Thank you in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Top menu – how does it get created?’ is closed to new replies.