• Resolved aerir

    (@aerir)


    I have a menu made using Elementor and trying to customized my WPML language switcher. It needs the theme_location value but it is returning null, is there any other method to retrieve it?

    I’m using this function to find output the theme_location

    // uncomment this to find your theme's menu location
    //echo "args:
    <pre>"; print_r($args); echo "</pre>
    
        [item_spacing] => preserve
        [depth] => 0
        [walker] => 
        [theme_location] => 
    )
    • This topic was modified 6 years, 6 months ago by aerir.
    • This topic was modified 6 years, 6 months ago by aerir.
Viewing 1 replies (of 1 total)
  • @aerir

    Elementor Nav Menu widget doesn’t use the theme_location property of the wp_nav_menu because the menu is inserted in the widget location and not in a specific theme location. But you can use either menu_id or menu_name in order to identify the correct menu and add the language links to it.

    Please feel free to open an issue on our Github Repo with the code you have and I’ll try to help.

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