Unless users have disabled it from settings, WordPress automatically shows an admin toolbar at the top of the page for logged-in users.
Add this code to the functions.php file in your theme to hide/remove WP admin toolbar:
add_filter('show_admin_bar', '__return_false');
Alternative code: If you want, the below code can also be used to hide the WordPress admin toolbar from the front-end instead of the above code.
function themesdna_remove_admin_bar() {
show_admin_bar(false);
}
add_action('after_setup_theme', 'themesdna_remove_admin_bar');
Don't forget to save the functions.php.