How to remove black admin toolbar in WordPress website frontend

0
1880

WordPress by default shows admin bar (black strip on top of your website) when you are logged in. Though this contains important information, it is at times distracting for a user on frontend of the website.

The admin toolbar is very annoying as it disrupts the overall design theme. I’ve personally like to remove the top black bar from frontend. Once the toolbar is hidden from frontend, you don’t have to open an incognito window for frontend and other for wordpress backend. You have different tabs open for backend and frontend.

Today I’ll show you how to disable the admin toolbar from website’s frontend – Using wordpress setting and php code in functions.php.

Steps to hide admin toolbar using wordpress settingsHide wordrpess admin toolbar

  1. Login to your wordpress admin (usually the url is https://yourdomain.com/wp-admin/)
  2. On the left sidebar click on USERS > YOUR PROFILE (refer image above)
  3. UNCHECK Show Toolbar when viewing site (refer image above)
  4. Click on Update Profile and you are done. Now you’ll not see the back bar on top when viewing the website. Though the it’ll still be visible on the backend.

Steps to hiide admin toolbar using php code in functions.php

  1. Login to your wordpress admin (usually the url is https://yourdomain.com/wp-admin/)
  2. On the left sidebar click on Appearance > Editor
  3. On the right panel look for Theme Functions (functions.php) and click on it to open
  4. Once the functions.php is open paste the below code and click on UPDATE FILE.
  5. That’s it now the users will not see the top admin toolbar when logged in on website frontend.

Functions.php code to remove admin toolbar

<?php

add_filter(‘show_admin_bar’, ‘__return_false’);

?>

1 COMMENT

LEAVE A REPLY

Meaningful discussions leads to better results. Leave your thoughts on the article.
Please enter your comment!
Please enter your name here