If you are creating a community website, it’s mostly possible that you will want to remove the top bar for your users. It’s distracting and they might get interested to access different areas of your theme that you don’t want. Unfortunately WordPress does not give us a lot of options regarding how to top bar is shown and used, but you can surely try code it to work like you want it to.

Disable for all excerpt administrators

add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {
show_admin_bar(false);
}
}

Make sure you add the code above into your child theme or a custom plugin maybe, so that you don’t lose your changes when you update.

Disable admin bar for everybody

show_admin_bar(false);

It’s that easy. This function will disable the admin bar for any user. Not really recommended, makes your WordPress website harder to administer.