Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14318 reviews 1707 hosting providers

Questions & Answers

WordPress Custom Menu sidebar for different pages

Feb 26, 2013 by SunFun
Hi all
I want to display different custom menus in the side bar of different pages and categories. To make it clear, I want to have different sidebar menus for every categorized page. I am using WordPress 2.5 . Can anyone please advice?

2 Answers

0 votes
Feb 26, 2013 by WebProX
Use this code in your theme's file
if (is_page('3'){
wp_nav_menu(array('menu'=>'menu3', ));
} elseif (is_page(4)) {
wp_nav_menu(array('menu'=>'menu4' ));
Or if you want more than one page to have the same menu use the below code :
is_page( array( 5, 6, 7 ) )
wp_nav_menu(array('menu'=>'menu5', ));
0 votes
Feb 26, 2013 by WebProX
You can use the Dynamic widgets plugin.