• Greetings. I am stumped, but I know there is a way.

    I have a menu that changes depending on the item for example.

    the background color and the menu items change depending on if you are on about the company, productions, and so forth.

    the menus are already registered in functions.php and they work.

    the thing is I would like to create 1 template instead of many and change this:

    <?php wp_nav_menu( array( 'container_class' => 'sub_menu', 'theme_location' => 'about' , 'container' => '' ) ); ?>

    to this

    <?php wp_nav_menu( array( 'container_class' => 'sub_menu', 'theme_location' => '$variable' , 'container' => '' ) ); ?>

    now I got the variable to work using the ‘advanced custom field’ plugin; however, the wp_nav_menu() does not recognize the variable.

    Do I have to do something with a walker (thing)?

    Oh by the way this is a brand new theme I am creating so I am not borrowing or using any theme other than my own.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘sending a variable to theme_location’ is closed to new replies.