cant get vars from url
-
Hello guys,
I develop a theme which display three diffrent menus in one block.
To do so I use $_GET to switch between the menu, Example:<a href="?navopt=main">Main</a><a href="?navopt=brand">Brands</a><a href="?navopt=filter">Filter</a> <?php $nav = ( $_GET['navopt'] ) ? $_GET['navopt'] : main ; wp_nav_menu( array( 'theme_location' => $nav, 'container' => 'false' ) ); echo $nav; ?>
*The final echo is just for debugging.
But when I use get_query_var(), it doesnt work.
(I replaced the $_GET[‘navopt’] with get_query_var(‘navopt’).
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘cant get vars from url’ is closed to new replies.