Hi @franwess
Your question is too general with WordPress Menu question. This requires customisation on your end. You can try the code below but you will have to modify it to match your requirement:
function wpse101120_exclude_menu_items( $items, $menu, $args ) {
$user_id = get_current_user_id();
$hide_menu = 168;
// Iterate over the items to search and destroy
foreach ( $items as $key => $item ) {
if ( $item->object_id == $hide_menu && $user_id == 123 ) unset( $items[$key] );
}
return $items;
}
add_filter( 'wp_get_nav_menu_items', 'wpse101120_exclude_menu_items', null, 3 );
Regards,
Hi @franwess
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread if any other questions come up and we’d be happy to help. 🙂
Regards,