Alternative Menus in header
-
Hi,
Total newbie, so bear with me!
Theme used is twentyeleven, with Child Theme.
Site has area for Public and one for Members, which is by login i.e “Protected”. Menus registered in Child Theme functions.php.
I have followed similar topics but conditional statement in header.php fails. i.e ‘if’ works (tried switching it) ‘else’ never actions.” <nav id=”access” role=”navigation”>
<h3 class=”assistive-text”><?php _e( ‘Main menu’, ‘twentyeleven’ ); ?></h3>
…………………etc
<?php
if ( !post_password_required() ) {
wp_nav_menu( array( ‘theme_location’ => ‘members-menu’,’menu_id’ => ‘menu’) );
} else {
wp_nav_menu(array(‘theme_location’ => ‘public-menu’,’menu_id’ => ‘menu’) );
}
?>
</nav>
“I have also tried conditional
“if ( is_user_logged_in() ) { “etcAny pointers as to what I have missed would be appreciated.
The topic ‘Alternative Menus in header’ is closed to new replies.