Peak Positions SEO Logo 231-922-9460

Disable the WordPress Admin Bar Without a Plugin

January 10th, 2022

Is the WordPress admin bar getting in the way of some of your websites functionality or not really needed by your users? The WordPress admin bar is a horizontal bar that appears at the top of your WordPress website when you are logged in as an administrator or another user with appropriate permissions. It provides quick access to various administrative functions, such as creating new posts or pages, managing comments, and accessing the WordPress dashboard. If your website does not need the admin bar or wants to temporarily disable it for testing, here is a simple way to remove the WordPress admin bar without a plugin.

Add this snippet of code to your themes functions.php file:

// Remove the admin bar from the front end
add_filter( 'show_admin_bar', '__return_false' );

How do I edit the functions.php file?

Editing via the WordPress Admin Backend: To edit the functions.php file through the WordPress admin backend, simply log in to your WordPress dashboard, go to “Appearance,” and select “Theme Editor.” There, you’ll find a list of theme files, including “Theme Functions (functions.php).” Click on it, make your desired modifications, and save the changes by clicking the “Update File” button.

Editing via FTP: Editing the functions.php file via FTP involves connecting to your web server using an FTP client. Navigate to your WordPress theme’s directory, find the functions.php file, download it to your local computer, and make your edits using a code editor. After saving the changes, upload the modified file back to the server.

*Make a backup of your website before making any edits to theme files, and only make the edits if you have experience with modifying files on your WordPress website.

TOP 20 SEO COMPANY WORLDWIDE SIX YEARS IN A ROW

Our SEO firm is comprised of a world class team of qualified coders, web designers, developers & SEO copywriters who strive to bring clients the highest quality SEO services in the industry.

Free Website Audit
Top 20 SEO Company Worldwide
  • Dell Logo
  • Ferris State University Logo
  • Sony Logo
  • Primerus Logo
  • Detroit Medical Center Logo
  • Tenet Health Logo
Contact Us

Peak Positions SEO
10850 East Traverse Highway, Suite 2290
Traverse City, MI 49684

231-922-9460

info@peakpositions.com