After googling for 2 hours, I finally added the following snippet to my function.php file.
But It doesn’t work.
if( current_user_can( ‘read’ ) && !current_user_can( ‘edit_posts’ ) ) {
function remove_dashboard_widgets() {
remove_meta_box( ‘admin_dashboard_last_edits_register’, ‘dashboard’, ‘normal’);
}
add_action(‘wp_user_dashboard_setup’, ‘remove_dashboard_widgets’, 20);
add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’, 20);
}