Manually working with menu translations
-
I’m currently working on a private theme design which splits menus up (main menu, sub menus, etc…)
In the theme you can choose can chose which sub menu item is chosen as the default when the main menu is clicked and the page is redirected…
I’m trying to integrate polylang into this theme design but I’m unable to work with the menus which polylang handles.
I’d like to request some functionality to work with the polylang menus in the form of functions similar to the following:
pll_get_menus($menulocation) // Return all polylang menus for the specified menu location as key=>value array (language=>menu). pll_get_current_menu($menulocation) // Return the current menu chosen by polylang as a replacement for the actual WordPress menu for the current language.
I’m currently having to fetch all menus using
get_term( $locations[$theme_location], 'nav_menu' );
and filter the menus by name/slug which forces me to use statically typed menu namesIf there is already a better alternative to my work around please advise as I checked the documentation and could not find reference to menu functions.
Thanks for the awesome plugin by the way ??
- The topic ‘Manually working with menu translations’ is closed to new replies.