Adding URL parameters to menu items
-
I currently use 2 menus on my site, defined through Appearance->Menus, each menu written in a different language. I use my own PHP code to distinguish between the 2 when generating a page:
<?php switch($_SESSION['lang']) { case 0: wp_nav_menu(array('theme_location' => 'primary')); break; case 1: wp_nav_menu(array('theme_location' => 'primary', 'menu' => 'French Menu')); } ?>
The French pages can be obtained by e.g.
https://www.mysite.com/news/?language=1
The above works well but the principal question is this: does anyone know of a way, without hard-coding WP core, that I can have the French menu automatically append an URL parameter on to the end of all of its menu items?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Adding URL parameters to menu items’ is closed to new replies.