Updates, Tips & Tricks

Updates as Released, Plus My Personal Collection Of WordPress Best Practices

Remove the Admin Bar From WordPress Public Side

08 April

Add the following snippet to your functions.php to remove the Admin bar from all logged in users except administrators:

// Remove the admin bar
function dont_show_admin_bar($content) {
    return ( current_user_can("administrator") ) ? $content : false;
}
add_filter( 'show_admin_bar' , 'dont_show_admin_bar');
No comments yet.

Leave a Reply