Exclude pages from wordpress menu

You can do it in two ways:

1).

$defaults = array(‘sort_column’ => ‘menu_order, post_title’, ‘menu_class’ => ‘menu’, ‘echo’ => true, ‘link_before’ => ”, ‘link_after’ => ”,’exclude’=>’11,12′);
$args = wp_parse_args( $args, $defaults );
$args = apply_filters( ‘wp_page_menu_args’, $args );

 

2). <?php wp_list_pages(‘exclude=11,12’ ); ?>

Leave a Reply

Your email address will not be published. Required fields are marked *