How To Remove Address Book on Client Frontend Dashboard
- Copy and paste this code:
add_filter('wpcfe_after_sidebar_menu_items', 'remove_addressbook_sidebar_menus_callback', 21, 1 ); function remove_addressbook_sidebar_menus_callback( $menu_array ){ /* * $menu_array['address-book-menu'] - Is the Address book menu */ $current_user = wp_get_current_user(); if( in_array( 'wpcargo_client' , $current_user->roles ) ){ if( function_exists('wpcfe_admin_page') && wpc_can_add_address_book() ){ unset($menu_array['address-book-menu']); } } return $menu_array; }