December 20, 201114 yr Hello, I want to have sub menus on my site so I need a php script that will say "if is about page display menu 1, if is services display menu 2" etc Can somebody help me or point me to a good resource please. Thanks a lot
December 24, 201114 yr thats easy. just use if(is_page('about')) { wp_nav_menu(array( 'container' => '', 'theme_location' => 'menu1' )); } elseif(is_page('services')) { wp_nav_menu(array( 'container' => '', 'theme_location' => 'menu2' )); } Edited December 24, 201114 yr by keevitaja
December 24, 201114 yr thats easy. just use if(is_page('about')) { wp_nav_menu(array( 'container' => '', 'theme_location' => 'menu1' )); } elseif(is_page('services')) { wp_nav_menu(array( 'container' => '', 'theme_location' => 'menu2' )); } This ^^^ Have a read up on conditional tags here
Create an account or sign in to comment