Codex tools: Log in
Contents |
Set the display status of the Toolbar for the front side of your website (you cannot turn off the toolbar on the WordPress dashboard).
Note: The Admin Bar is replaced with the Toolbar since WordPress Version 3.3.
<?php show_admin_bar( $bool ); ?>
none
This function can be called immediately upon plugin load or placed in the theme's functions.php file.
This function will also affect the display of the Toolbar in the dashboard for WordPress versions prior to Version 3.3.
<?php show_admin_bar( false ); ?>
Placing the above line of code in your template files before wp_footer() is called, or otherwise calling the function before wp_footer() is called, will prevent the Toolbar from rendering on the front end of your site.
show_admin_bar() is located in wp-includes/admin-bar.php.