Customizing menus
-
I’ve created 2 similar menus – logged_off and logged_on.
I’ve copied the header.php file into my shell-lite-child theme.
I’ve added this
<?php
if( is_user_logged_in() ) {
$menu = ‘logged_on’;
} else {
$menu = ‘logged_off’;
}<?php if (has_nav_menu('primary', 'shell')) { ?> <?php wp_nav_menu(array( 'container' => '', 'menu_class' => 'menu', 'theme_location' => 'primary') ); ?> <?php } else { ?>
So how should I change the array to work with the $menu variable?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Customizing menus’ is closed to new replies.