• Hey, upgrading from 3.7.31 to 4.6.16 and the following line of code is no longer calling ‘Primary Menu’ but rather the menu for the page you are visiting. Is this line completely antiquated at this point seeing how it is years old?

    <?php wp_nav_menu('menu=primary&menu_class=top-nav&container=&container_class=&menu_id='); ?>

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Yeah, it will not accept an argument string any more, it must be an arguments array, like so:

    <?php wp_nav_menu( array(
       'menu'=>'primary',
       'menu_class'=>'top-nav',
    )); ?>

    No need to supply arguments that will be default values, the '&container=&container_class=&menu_id=' bits.

    Are you planning to update further, to the current 5.3? (you should) I get wanting to update in steps, I’m inclined to do so myself. In theory it’s not necessary, but still…

Viewing 1 replies (of 1 total)

The topic ‘wp_nav_menu no longer calling menu requested’ is closed to new replies.