0

I want to change the menu_class on my navigation bar, but the second I try to use the 'array' method to display my nav, it disappears.

This works:

<?php wp_nav_menu('Profit.Ology'); ?>

This doesn't:

<?php wp_nav_menu( array( 'menu' => 'Profit.Ology' ) ); ?>

I don't get it...

3
  • If wp_nav_menu() isn't passed an array with a menu value, it will display the first non empty menu available, which is why something is displaying for the first example. I'd be willing to bet there isn't any menu with the name, id or slug of Profit.Ology. Nov 3, 2014 at 23:26
  • But I have created a menu called 'Profit.Ology'. I even tried to change it to 'profitology' in case the period was causing an issue. I've used this method on all my other sites, but this one it's not working. I'm trying to see if it's a theme issue, my client insisted I used a bootstrap theme, and I've never worked with it before.
    – KVDD
    Nov 3, 2014 at 23:33
  • Huh, fair enough then. Does it work if you use the default theme and no plugins? The theme or some plugins could certainly be overriding something. Nov 3, 2014 at 23:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.