Adding language switcher to main nav

Community Forums Forums Design Tips and Tricks Adding language switcher to main nav

This topic is: resolved

Tagged: 

This topic contains 15 replies, has 3 voices, and was last updated by  lucaslem 11 months ago.

Viewing 16 post (of 16 total)
  • Author
    Posts
  • #59323

    lucaslem
    Participant
    Post count: 88

    It doesn’t have to be organized like that. You could simply code it to look affirmatively for that menu, and when found, do something.

    Given that I have several menus, that was exactly the approach I was trying with

         if ( 'Primary Navigation' == $args['menu'] ) {
         return $menu;
    }

    Where “Primary navigation” is not the theme_location but the menu name. This is the part I am still dumbfounded by. It’s as if using the $menu parameter rather than the $theme_location parameter just didn’t work.

    And yes I wholeheartedly agree regarding the PHP abilities. I am doing the tutorials, reading the books, and being a good student. But also the best way to learn is to do and take things apart in order to understand. Thanks for all your feedback as you have contributed to that process.

Viewing 16 post (of 16 total)

You must be logged in to reply to this topic.