The admin bar is hooked incorrectly.It should be hooked to wp_before_admin_bar_render
.
This is what I use (and works):
function alter_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu( 'customize' );
$wp_admin_bar->remove_menu( 'ddw-gravityforms-toolbar' );
$wp_admin_bar->remove_menu( 'members-new-role' );
$wp_admin_bar->remove_menu( 'new-media' );
$wp_admin_bar->remove_menu( 'new-post' );
$wp_admin_bar->remove_menu( 'new-user' );
$wp_admin_bar->remove_menu( 'wp-logo' );
}
add_action( 'wp_before_admin_bar_render', 'alter_admin_bar' );
Regarding the side menu I don’t know. My first guess would be that you’re using incorrect identifiers.