wordpress - How to exclude pages from nav menu -


how can exclude page(s) nav menu? found examples field called "exclude" added args , reportedly worked. maybe it's deprecated. have version 4.1.5.

my current code is:

$avia_theme_location = 'avia'; $avia_menu_class = $avia_theme_location . '-menu'; $args = array(     'theme_location' => $avia_theme_location,     'menu_id' => $avia_menu_class,     'exclude' => '29, 30, 31, 32',     'menu_class' => 'menu av-main-nav',     'container_class' => $avia_menu_class.' av-main-nav-wrap'.$icon_beside,     'fallback_cb' => 'avia_fallback_menu',     'walker' => new avia_responsive_mega_menu() );  wp_nav_menu($args); 

where 29,30,31 , 32 pages ids want exclude , correct.

you may use this:

$args = array(     // other values,     'exclude' => array(29,30,31,32) // <-- addedd ids exclude );  wp_nav_menu($args); 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -