hi,
you can pass argument into primary menu function ‘exclude’ =>$pageId which will remove perticular page from primary menu.
wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_class’ => ‘nav-menu’,’exclude’ => $pageId ) );
hi, thanks for your reply. Unfortunately i still can`t figure it out.
Here`s the original Code from my header.php:
`<nav id=”site-navigation”>
<a href=”javascript:void(0);” class=”menu-toggle dl-trigger”><?php _e(‘Menu’, ‘codeus’); ?></a>
<?php if(has_nav_menu(‘primary’)) { wp_nav_menu(array(‘theme_location’ => ‘primary’, ‘menu_class’ => ‘nav-menu styled main_menu dl-menu’, ‘container’ => false, ‘walker’ => new Codeus_Menu_Walker)); } ?>
</nav>`
Hi,
Replace your code by following,
<nav id=”site-navigation”>
<?php _e(‘Menu’, ‘codeus’); ?>
<?php if(has_nav_menu(‘primary’)) { wp_nav_menu(array(‘theme_location’ => ‘primary’, ‘menu_class’ => ‘nav-menu styled main_menu dl-menu’, ‘container’ => false, ‘walker’ => new Codeus_Menu_Walker,’exclude’ => $pageId)); } ?>
</nav>
Where $pageId should be replace by id of your carting page.