Adding custom menus to pages
-
Hey all,
I am working with a client who wants custom menus for four main pages of their site, One Earth Solutions. Using a child theme of Twenty Eleven, I have registered and set the menus up, but I’m struggling when it comes to assigning the menu’s to pages. Here is my code in my header.php file:<?php if (is_page('permaculture')){ wp_nav_menu(array('menu'=>'permaculture' )); } elseif (is_page('farm')) { wp_nav_menu(array('menu'=>'farm' )); } elseif(is_page('energy')){ wp_nav_menu(array('menu'=>'energy' )); } elseif (is_page('home')) { wp_nav_menu(array('menu'=>'primary' )); } ?>
I can’t figure out what I’m missing – any help would be appreciated!
[Moderator Note: Please post code or markup snippets between backticks or use the code button.]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding custom menus to pages’ is closed to new replies.