Well, there are a couple of ways you can do this.
1. Create a separate custom menu for each.
2. Load the correct menu in your template file using the wp_nav_menu function like this:
<?php
//functions.php in your theme
add_action( 'init', 'register_my_menus' );
function register_my_menus() {
register_nav_menus(
array( 'public-menu' => __( 'Public Menu' ),
'member-menu-1' => __( 'Member Menu 1' ),
'member-menu-2' => __( 'Member Menu 2' ),
'member-menu-3' => __( 'Member Menu 3' ))
);
}
?>
Place something like this in your theme where the menu goes:
<?php
if(current_user_can("access_s2member_level2")){
wp_nav_menu(array('theme_location' => 'member-menu-2'));
}
else if(current_user_can("access_s2member_level1")){
wp_nav_menu(array('theme_location' => 'member-menu-1'));
}
else {
wp_nav_menu( array( 'theme_location' => 'public-menu' ) );
}
?>
Another option would be to use the wp_nav_menu_objects filter to add items to an existing menu like this in your functions.php file in your theme:
<?php
add_filter( 'wp_nav_menu_objects', 'add_menu_items', 10, 2 );
function add_menu_items( $sorted_menu_items, $args )
{
$link1 = array (
'title' => 'Extra Page 1',
'menu_item_parent' => 0,
'ID' => '',
'db_id' => '',
'url' => site_url('extra-page-1'); //basic site_url() with page or post slug
);
$link2 = array (
'title' => 'Extra Page 2',
'menu_item_parent' => 0,
'ID' => '',
'db_id' => '',
'url' => site_url('extra-page-2'); //basic site_url() with page or post slug
);
if(current_user_can("access_s2member_level1")){
$sorted_menu_items[] = (object) $link1;
}
if(current_user_can("access_s2member_level2")){
$sorted_menu_items[] = (object) $link2;
}
return $sorted_menu_items;
}
?>
Hope that helps,
Dave