{"id":25748,"date":"2021-01-30T12:00:43","date_gmt":"2021-01-30T12:00:43","guid":{"rendered":"https:\/\/opendesign.gr\/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators\/"},"modified":"2023-04-21T10:12:17","modified_gmt":"2023-04-21T08:12:17","slug":"how-to-disable-wordpress-admin-bar-for-all-users-except-administrators","status":"publish","type":"post","link":"https:\/\/opendesign.gr\/gr\/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators\/","title":{"rendered":"\u03a0\u03a9\u03a3 \u039d\u0391 \u0391\u03a0\u0395\u039d\u0395\u03a1\u0393\u039f\u03a0\u039f\u0399\u0397\u03a3\u0395\u03a4\u0395 \u03a4\u0397\u039d WP ADMIN TOOLBAR \u0393\u0399\u0391 \u039f\u039b\u039f\u03a5\u03a3 \u03a4\u039f\u03a5\u03a3 \u03a7\u03a1\u0397\u03a3\u03a4\u0395\u03a3, \u0395\u039a\u03a4\u039f\u03a3 \u0391\u03a0\u039f \u03a4\u039f\u03a5\u03a3 \u0394\u0399\u0391\u03a7\u0395\u0399\u03a1\u0399\u03a3\u03a4\u0395\u03a3"},"content":{"rendered":"<div>\n<p>Do you want to easily disable the admin bar in WordPress?<\/p>\n<p>By default, you can easily disable the WordPress admin bar for any user from the dashboard. But this method can take time if you have a lot of registered users on your site.<\/p>\n<p>In this article, we\u2019ll show you how to disable the WordPress admin bar for all users except administrators.<\/p>\n<h4>What is WordPress Admin Bar?<\/h4>\n<p>By default, WordPress displays an admin bar on the top for all logged-in users. This toolbar is visible in the <a title=\"Admin Area\" href=\"https:\/\/www.wpbeginner.com\/glossary\/admin-area\/\">WordPress admin area<\/a> as well as all other pages when you are logged in.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-80925\" title=\"WordPress Admin Bar\" src=\"https:\/\/opendesign.gr\/wp-content\/uploads\/2021\/01\/admin-bar.png\" alt=\"WordPress admin bar\" width=\"550\" height=\"369\" \/><\/p>\n<p>The <a title=\"What Everybody Ought to Know about the WordPress Admin Bar\" href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/what-everybody-ought-to-know-about-the-wordpress-admin-bar\/\">WordPress admin toolbar<\/a> contains useful shortcuts to different WordPress sections. The shortcuts available in the admin bar change based on a <a title=\"Beginner\u2019s Guide to WordPress User Roles and Permissions\" href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/wordpress-user-roles-and-permissions\/\">users\u2019 role and permissions in WordPress<\/a>.<\/p>\n<p>However, when viewing the public pages on the front-end of your website, the admin bar can be a bit distracting. It may also affect your website\u2019s design and user experience.<\/p>\n<p>Luckily, there are multiple ways to easily disable the WordPress admin bar for all users except administrators.<\/p>\n<h4>Method 1. Disabling The WordPress Admin Bar for Any User<\/h4>\n<p>WordPress allows each user to disable the admin bar by simply editing their user profile. As a site owner, you can also edit other user\u2019s profiles and disable the admin bar for them.<\/p>\n<p>If you want to disable the admin bar for any particular user in WordPress, you\u2019ll need to edit their user profile.<\/p>\n<p>Simply go to the <strong>Users \u00bb All Users<\/strong> page and then click on the \u2018edit\u2019 link for any user you want to disable the admin bar for.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-80927\" title=\"Edit User Settings\" src=\"https:\/\/opendesign.gr\/wp-content\/uploads\/2021\/01\/edit-user.png\" alt=\"Edit user settings\" width=\"550\" height=\"189\" \/><\/p>\n<p>This will bring you to the user profile editor page. From here, uncheck the box next to the \u2018Show toolbar when viewing site\u2019 option.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-80926\" title=\"Disable Admin Bar\" src=\"https:\/\/opendesign.gr\/wp-content\/uploads\/2021\/01\/disable-admin-bar.png\" alt=\"Disable admin bar\" width=\"547\" height=\"89\" \/><\/p>\n<p>Scroll down and click the \u2018Update User\u2019 button to save your changes.<\/p>\n<p>This will disable the admin bar for that particular user when they visit the website.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-80929\" title=\"Site Without Admin Bar\" src=\"https:\/\/opendesign.gr\/wp-content\/uploads\/2021\/01\/no-admin-bar.png\" alt=\"Site without admin bar\" width=\"550\" height=\"346\" \/><\/p>\n<p>If you have a handful of users, then you can go ahead and manually disable the admin bar for all of them. However, if you run a <a title=\"Ultimate Guide to Creating a WordPress Membership Site\" href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/ultimate-guide-to-creating-a-wordpress-membership-site\/\">membership site<\/a> with a lot of users, then this method wouldn\u2019t work.<\/p>\n<p>Luckily, there are other ways to quickly disable the admin bar for all users except administrators.<\/p>\n<h4>Method 2. Disable Admin Bar for All Users Except Admins with a Plugin<\/h4>\n<p>This method allows you to quickly disable the WordPress admin for all users.<\/p>\n<p>\u03a0\u03c1\u03ce\u03c4\u03b1, \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03b5\u03b3\u03ba\u03b1\u03c4\u03b1\u03c3\u03c4\u03ae\u03c3\u03b5\u03c4\u03b5 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03b5\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03c4\u03b5 \u03c4\u03bf <a title=\"Hide Admin Bar Based on User Roles Plugin\" href=\"https:\/\/wordpress.org\/plugins\/hide-admin-bar-based-on-user-roles\/\" target=\"_blank\" rel=\"noopener nofollow\">Hide Admin Bar Based on User Roles<\/a> plugin. \u0393\u03b9\u03b1 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03bb\u03b5\u03c0\u03c4\u03bf\u03bc\u03ad\u03c1\u03b5\u03b9\u03b5\u03c2, \u03b1\u03bd\u03b1\u03c4\u03c1\u03ad\u03be\u03c4\u03b5 \u03c3\u03c4\u03bf\u03bd \u03b2\u03ae\u03bc\u03b1 \u03c0\u03c1\u03bf\u03c2 \u03b2\u03ae\u03bc\u03b1 \u03bf\u03b4\u03b7\u03b3\u03cc \u03bc\u03b1\u03c2 <a title=\"\u039f\u03b4\u03b7\u03b3\u03cc\u03c2 \u03b2\u03ae\u03bc\u03b1 \u03c0\u03c1\u03bf\u03c2 \u03b2\u03ae\u03bc\u03b1 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b5\u03b3\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bc\u03b9\u03b1\u03c2 \u03c0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7\u03c2 WordPress \u03b3\u03b9\u03b1 \u03b1\u03c1\u03c7\u03ac\u03c1\u03b9\u03bf\u03c5\u03c2\" href=\"http:\/\/www.wpbeginner.com\/beginners-guide\/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners\/\">\u03c0\u03ce\u03c2 \u03bd\u03b1 \u03b5\u03b3\u03ba\u03b1\u03c4\u03b1\u03c3\u03c4\u03ae\u03c3\u03b5\u03c4\u03b5 \u03ad\u03bd\u03b1 \u03c0\u03c1\u03cc\u03c3\u03b8\u03b5\u03c4\u03bf WordPress<\/a>.<\/p>\n<p>Upon activation, go to the <strong>Settings \u00bb Hide Admin Bar Settings<\/strong> page. From here, check the boxes next to the user roles where you want to disable the admin bar.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-80928\" title=\"Hide Admin Settings With A Plugin\" src=\"https:\/\/opendesign.gr\/wp-content\/uploads\/2021\/01\/hide-admin-settings.png\" alt=\"Hide Admin settings with a plugin\" width=\"550\" height=\"380\" \/><\/p>\n<p>Don\u2019t forget to click on the \u2018Save Changes\u2019 button to store your settings.<\/p>\n<h4>Method 3. Disable Admin Bar for All Users Except Administrators Using Code<\/h4>\n<p>This method requires you to add code to your WordPress theme files. If you have not done this before, then check out our guide on <a title=\"Beginner\u2019s Guide to Pasting Snippets from the Web into WordPress\" href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress\/\">how to copy and paste code snippets in WordPress<\/a>.<\/p>\n<p>Simply add the following code to your theme\u2019s <a title=\"What is functions.php File in WordPress?\" href=\"http:\/\/www.wpbeginner.com\/glossary\/functions-php\/\">functions.php<\/a> file or a <a title=\"What, Why, and How-To\u2019s of Creating a Site-Specific WordPress Plugin\" href=\"http:\/\/www.wpbeginner.com\/beginners-guide\/what-why-and-how-tos-of-creating-a-site-specific-wordpress-plugin\/\">site-specific plugin<\/a>.<\/p>\n<pre class=\"brush: php; title: ; notranslate\">add_action('after_setup_theme', 'remove_admin_bar');\r\nfunction remove_admin_bar() {\r\nif (!current_user_can('administrator') &amp;&amp; !is_admin()) {\r\n  show_admin_bar(false);\r\n}\r\n}\r\n<\/pre>\n<p>This code checks if the current user is not an administrator, and they are not viewing the admin dashboard. If both conditions match, then it will disable the WordPress admin bar.<\/p>\n<p>Don\u2019t forget to save your changes and check your website to make sure everything is working fine.<\/p>\n<h4>Method 4. Disable Admin Bar for All Users Including Admins<\/h4>\n<p>What if you wanted to disable the admin bar for all users including yourself and any other administrator on your site?<\/p>\n<p>You can do this by modifying the code we showed earlier.<\/p>\n<p>Simply add the following code to your theme\u2019s <a title=\"What is functions.php File in WordPress?\" href=\"http:\/\/www.wpbeginner.com\/glossary\/functions-php\/\">functions.php<\/a> file or a <a title=\"What, Why, and How-To\u2019s of Creating a Site-Specific WordPress Plugin\" href=\"http:\/\/www.wpbeginner.com\/beginners-guide\/what-why-and-how-tos-of-creating-a-site-specific-wordpress-plugin\/\">site-specific plugin<\/a>.<\/p>\n<pre class=\"brush: php; title: ; notranslate\">\/* Disable WordPress Admin Bar for all users *\/\r\nadd_filter( 'show_admin_bar', '__return_false' );\r\n<\/pre>\n<p>This code will disable the admin bar for all users when viewing the public pages of your website. All users will still be able to see the toolbar inside the WordPress admin dashboard.<\/p>\n<p>We hope this article helped you learn how to disable the WordPress admin bar for all users except administrators. You may also want to see our <a title=\"The Ultimate WordPress Security Guide \u2013 Step by Step (2020)\" href=\"https:\/\/www.wpbeginner.com\/wordpress-security\/\">ultimate WordPress security guide<\/a> and our comparison of the <a title=\"6 Best Drag and Drop WordPress Page Builders Compared (2020)\" href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/best-drag-and-drop-page-builders-for-wordpress\/\">best WordPress page builder<\/a> for creating custom page layouts without any code.<\/p>\n<p>If you liked this article, then please subscribe to our <a title=\"WPBeginner on YouTube\" href=\"http:\/\/youtube.com\/wpbeginner?sub_confirmation=1\" target=\"_blank\" rel=\"nofollow noopener\">YouTube Channel<\/a> for WordPress video tutorials. You can also find us on <a title=\"WPBeginner on Twitter\" href=\"http:\/\/twitter.com\/wpbeginner\" target=\"_blank\" rel=\"nofollow noopener\">Twitter<\/a> \u03ba\u03b1\u03b9 <a title=\"WPBeginner on Facebook\" href=\"https:\/\/www.facebook.com\/wpbeginner\" target=\"_blank\" rel=\"nofollow noopener\">Facebook<\/a>.<\/p>\n<p>The post <a href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators\/\" rel=\"nofollow\">How to Disable WordPress Admin Bar for All Users Except Administrators<\/a> appeared first on <a href=\"https:\/\/www.wpbeginner.com\/\" rel=\"nofollow\">WPBeginner<\/a>.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Do you want to easily disable the admin bar in WordPress? By default, you can easily disable the WordPress admin bar for any user from the dashboard. But this method can take time if you have a lot of registered users on your site. In&#8230;<\/p>","protected":false},"author":1,"featured_media":25749,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"give_campaign_id":0,"slim_seo":{"title":"\u03a0\u03a9\u03a3 \u039d\u0391 \u0391\u03a0\u0395\u039d\u0395\u03a1\u0393\u039f\u03a0\u039f\u0399\u0397\u03a3\u0395\u03a4\u0395 \u03a4\u0397\u039d WP ADMIN TOOLBAR \u0393\u0399\u0391 \u039f\u039b\u039f\u03a5\u03a3 \u03a4\u039f\u03a5\u03a3 \u03a7\u03a1\u0397\u03a3\u03a4\u0395\u03a3, \u0395\u039a\u03a4\u039f\u03a3 \u0391\u03a0\u039f \u03a4\u039f\u03a5\u03a3 \u0394\u0399\u0391\u03a7\u0395\u0399\u03a1\u0399\u03a3\u03a4\u0395\u03a3","description":"In this article, we\u2019ll show you how to disable the WordPress admin bar for all users except administrators."},"footnotes":"","_links_to":"","_links_to_target":""},"categories":[1],"tags":[],"class_list":["post-25748","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/opendesign.gr\/gr\/wp-json\/wp\/v2\/posts\/25748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opendesign.gr\/gr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opendesign.gr\/gr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opendesign.gr\/gr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opendesign.gr\/gr\/wp-json\/wp\/v2\/comments?post=25748"}],"version-history":[{"count":0,"href":"https:\/\/opendesign.gr\/gr\/wp-json\/wp\/v2\/posts\/25748\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opendesign.gr\/gr\/wp-json\/wp\/v2\/media\/25749"}],"wp:attachment":[{"href":"https:\/\/opendesign.gr\/gr\/wp-json\/wp\/v2\/media?parent=25748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opendesign.gr\/gr\/wp-json\/wp\/v2\/categories?post=25748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opendesign.gr\/gr\/wp-json\/wp\/v2\/tags?post=25748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}