If you want to disable the toolbar for your own profile, click on “Users” > “Your Profile” in the top right corner of the WordPress admin interface and then disable the item “Show toolbar for me on the website” in the middle right corner.
Hide WordPress admin bar if page preview
However, if you want to hide the toolbar when previewing a page that is being edited, this can be solved with the following code:
add_filter( 'show_admin_bar', 'show_admin_bar_if_not_preview' );
function show_admin_bar_if_not_preview($show_admin_bar) {
return ( is_preview() ) ? false : $show_admin_bar;
}
Hide WordPress admin bar for all users
add_filter('show_admin_bar', '__return_false');