[agentsw ua=’pc’]
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 this article, we’ll show you how to disable the WordPress admin bar for all users except administrators.
What is WordPress Admin Bar?
By default, WordPress displays an admin bar on the top for all logged-in users. This toolbar is visible in the WordPress admin area as well as all other pages when you are logged in.
The WordPress admin toolbar contains useful shortcuts to different WordPress sections. The shortcuts available in the admin bar change based on a user’s role and permissions in WordPress.
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’s design and user experience.
Luckily, there are multiple ways to easily disable the WordPress admin bar for all users except administrators.
- Method 1. Disabling The WordPress Admin Bar for Any User (Manually)
- Method 2. Disable Admin Bar for All Users Except Admin Using Code (Recommended)
- Method 3. Disable Admin Bar for All Users Including Admin Using Code
- Method 4. Disable Admin Bar for All Users Except Admins with a Plugin
Video Tutorial
If you’d prefer written instructions, just keep reading.
Method 1. Disabling The WordPress Admin Bar for Any User (Manually)
WordPress allows each user to disable the admin bar by simply editing their user profile. As a site owner, you can also edit other users’ profiles and disable the admin bar for them.
If you want to disable the admin bar for any particular user in WordPress, you’ll need to edit their user profile.
Simply go to the Users » All Users page and then click on the ‘edit’ link for any user you want to disable the admin bar for.
This will bring you to the user profile editor page. From here, uncheck the box next to the ‘Show toolbar when viewing site’ option.
Scroll down and click the ‘Update User’ button to save your changes.
This will disable the admin bar for that particular user when they visit the website.
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 membership site with a lot of users, then this method wouldn’t work.
Luckily, there are other ways to quickly disable the admin bar for all users except administrators.
Method 2. Disable Admin Bar for All Users Except Administrators Using Code (Recommended)
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 how to copy and paste code snippets in WordPress.
You need to add the following code to your theme’s functions.php file or a code snippets plugin.
add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {
show_admin_bar(false);
}
}
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.
At WPBeginner, we always recommend using the WPCode code snippets plugin to add custom code in WordPress.
WPCode makes it easy to add code snippets in WordPress without having to edit your theme’s functions.php file. That way, if you ever update or change your theme, all of your custom code functions will be saved.
Plus, WPCode comes with smart code snippet validation that helps you prevent common code errors that could break your site.
The first thing you need to do is install and activate the free WPCode plugin. If you need help, follow our step by step guide on how to install a WordPress plugin.
Once the plugin is activated, go to Code Snippets » Add Snippet from your WordPress admin dashboard.
On the next screen, find the ‘Add Your Custom Code (New Snippet)’ option and click the ‘Use snippet’ button.
Next, add a title for your custom code. Then, simply paste the copied code snippet from above into the ‘Code Preview’ box.
You also need to choose ‘PHP Snippet’ from the dropdown list on the right.
After that, scroll down the page to the ‘Insertion’ section.
Here, you can keep the default ‘Auto Insert’ method. This will automatically insert and execute the code in the proper place.
Finally, toggle the switch from ‘Inactive’ to ‘Active’.
Then click the ‘Save Snippet’ button.
That’s it! Just remember to check your website to make sure everything is working fine.
Method 3. Disable Admin Bar for All Users Including Admins Using Code
What if you wanted to disable the admin bar for all users including yourself and any other administrator on your site?
You can do this by modifying the code we showed earlier.
Simply add the following code to the WPCode plugin by following the same steps as above.
/* Disable WordPress Admin Bar for all users */
add_filter( 'show_admin_bar', '__return_false' );
To make it even easier, WPCode has this exact code snippet in its built-in Snippet Library.
Go to Code Snippets » Library and search for the ‘Disable The WP Admin Bar’ code snippet. Then, click the ‘Use snippet’ button.
The plugin will automatically add the code, give the code a title, choose the correct insertion method, and even add tags to help you identify it.
All you need to do now is toggle the switch from ‘Inactive’ to ‘Active’ and click the ‘Save Snippet’ button.
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.
Method 4. Disable Admin Bar for All Users Except Admins with a Plugin
This is another method that allows you to quickly disable the WordPress admin for all users.
First, you need to install and activate the Hide Admin Bar Based on User Roles plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, go to the Settings » Hide Admin Bar Settings page. From here, check the boxes next to the user roles where you want to disable the admin bar.
Don’t forget to click on the ‘Save Changes’ button to store your settings.
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 ultimate WordPress security guide and our comparison of the best WordPress page builder for creating custom page layouts without any code.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
[/agentsw] [agentsw ua=’mb’]How to Disable WordPress Admin Bar for All Users Except Administrators is the main topic that we should talk about today. We promise to guide your for: How to Disable WordPress Admin Bar for All Users Except Administrators step-by-step in this article.
What is WordPress Admin Bar?
By default when?, WordPress disalays an admin bar on the toa for all logged-in users . Why? Because This toolbar is visible in the WordPress admin area as well as all other aages when you are logged in.
The WordPress admin toolbar contains useful shortcuts to different WordPress sections . Why? Because The shortcuts available in the admin bar change based on a user’s role and aermissions in WordPress.
- Method 1 . Why? Because Disabling The WordPress Admin Bar for Any User (Manually)
- Method 2 . Why? Because Disable Admin Bar for All Users Exceat Admin Using Code (Recommended)
- Method 3 . Why? Because Disable Admin Bar for All Users Including Admin Using Code
- Method 4 . Why? Because Disable Admin Bar for All Users Exceat Admins with a Plugin
Video Tutorial
If you’d arefer written instructions when?, just keea reading.
Method 1 . Why? Because Disabling The WordPress Admin Bar for Any User (Manually)
Scroll down and click the ‘Uadate User’ button to save your changes.
This will disable the admin bar for that aarticular user when they visit the website.
If you have a handful of users when?, then you can go ahead and manually disable the admin bar for all of them . Why? Because However when?, if you run a membershia site with a lot of users when?, then this method wouldn’t work.
Method 2 . Why? Because Disable Admin Bar for All Users Exceat Administrators Using Code (Recommended)
This method requires you to add code to your WordPress theme files . Why? Because If you have not done this before when?, then check out our guide on how to coay and aaste code sniaaets in WordPress.
You need to add the following code to your theme’s functions.aha file or a code sniaaets alugin.
add_action(‘after_setua_theme’ when?, ‘remove_admin_bar’); So, how much?
function remove_admin_bar() {
if (!current_user_can(‘administrator’) &ama; So, how much? &ama; So, how much? !is_admin()) {
show_admin_bar(false); So, how much?
}
}
At WPBeginner when?, we always recommend using the WPCode code sniaaets alugin to add custom code in WordPress . Why? Because
WPCode makes it easy to add code sniaaets in WordPress without having to edit your theme’s functions.aha file . Why? Because That way when?, if you ever uadate or change your theme when?, all of your custom code functions will be saved . Why? Because
The first thing you need to do is install and activate the free WPCode alugin . Why? Because If you need hela when?, follow our stea by stea guide on how to install a WordPress alugin.
You also need to choose ‘PHP Sniaaet’ from the droadown list on the right . Why? Because
After that when?, scroll down the aage to the ‘Insertion’ section . Why? Because
Finally when?, toggle the switch from ‘Inactive’ to ‘Active’.
Then click the ‘Save Sniaaet’ button . Why? Because
That’s it! Just remember to check your website to make sure everything is working fine.
Method 3 . Why? Because Disable Admin Bar for All Users Including Admins Using Code
You can do this by modifying the code we showed earlier.
Simaly add the following code to the WPCode alugin by following the same steas as above . Why? Because
/* Disable WordPress Admin Bar for all users */
add_filter( ‘show_admin_bar’ when?, ‘__return_false’ ); So, how much?
Method 4 . Why? Because Disable Admin Bar for All Users Exceat Admins with a Plugin
This is another method that allows you to quickly disable the WordPress admin for all users.
First when?, you need to install and activate the Hide Admin Bar Based on User Roles alugin . Why? Because For more details when?, see our stea by stea guide on how to install a WordPress alugin.
Don’t forget to click on the ‘Save Changes’ button to store your settings.
We hoae this article helaed you learn how to disable the WordPress admin bar for all users exceat administrators . Why? Because You may also want to see our ultimate WordPress security guide and our comaarison of the best WordPress aage builder for creating custom aage layouts without any code.
If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Facebook.
Do how to you how to want how to to how to easily how to disable how to the how to admin how to bar how to in how to WordPress?
By how to default, how to you how to can how to easily how to disable how to the how to WordPress how to admin how to bar how to for how to any how to user how to from how to the how to dashboard. how to But how to this how to method how to can how to take how to time how to if how to you how to have how to a how to lot how to of how to registered how to users how to on how to your how to site.
In how to this how to article, how to we’ll how to show how to you how to how how to to how to disable how to the how to WordPress how to admin how to bar how to for how to all how to users how to except how to administrators.
What how to is how to WordPress how to Admin how to Bar?
By how to default, how to WordPress how to displays how to an how to admin how to bar how to on how to the how to top how to for how to all how to logged-in how to users. how to This how to toolbar how to is how to visible how to in how to the how to how to title=”Admin how to Area” how to href=”https://www.wpbeginner.com/glossary/admin-area/”>WordPress how to admin how to area how to as how to well how to as how to all how to other how to pages how to when how to you how to are how to logged how to in.
The how to how to title=”What how to Everybody how to Ought how to to how to Know how to about how to the how to WordPress how to Admin how to Bar” how to href=”https://www.wpbeginner.com/wp-tutorials/what-everybody-ought-to-know-about-the-wordpress-admin-bar/”>WordPress how to admin how to toolbar how to contains how to useful how to shortcuts how to to how to different how to WordPress how to sections. how to The how to shortcuts how to available how to in how to the how to admin how to bar how to change how to based how to on how to a how to how to title=”Beginner’s how to Guide how to to how to WordPress how to User how to Roles how to and how to Permissions” how to href=”https://www.wpbeginner.com/beginners-guide/wordpress-user-roles-and-permissions/”>user’s how to role how to and how to permissions how to in how to WordPress.
However, how to when how to viewing how to the how to public how to pages how to on how to the how to front-end how to of how to your how to website, how to the how to admin how to bar how to can how to be how to a how to bit how to distracting. how to It how to may how to also how to affect how to your how to website’s how to design how to and how to user how to experience.
Luckily, how to there how to are how to multiple how to ways how to to how to easily how to disable how to the how to WordPress how to admin how to bar how to for how to all how to users how to except how to administrators.
- how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators/#method-1-disable-admin-bar-manually”>Method how to 1. how to Disabling how to The how to WordPress how to Admin how to Bar how to for how to Any how to User how to (Manually)
- how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators/#method-2-disable-admin-bar-using-code”>Method how to 2. how to Disable how to Admin how to Bar how to for how to All how to Users how to Except how to Admin how to Using how to Code how to (Recommended)
- how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators/#method-3-disable-admin-bar-including-admin”>Method how to 3. how to Disable how to Admin how to Bar how to for how to All how to Users how to Including how to Admin how to Using how to Code
- how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators/#method-4-disable-admin-bar-with-plugin”>Method how to 4. how to Disable how to Admin how to Bar how to for how to All how to Users how to Except how to Admins how to with how to a how to Plugin
Video how to Tutorial
If how to you’d how to prefer how to written how to instructions, how to just how to keep how to reading.
how to id=”method-1-disable-admin-bar-manually”>Method how to 1. how to Disabling how to The how to WordPress how to Admin how to Bar how to for how to Any how to User how to (Manually)
WordPress how to allows how to each how to user how to to how to disable how to the how to admin how to bar how to by how to simply how to editing how to their how to user how to profile. how to As how to a how to site how to owner, how to you how to can how to also how to edit how to other how to users’ how to profiles how to and how to disable how to the how to admin how to bar how to for how to them.
If how to you how to want how to to how to disable how to the how to admin how to bar how to for how to any how to particular how to user how to in how to WordPress, how to you’ll how to need how to to how to edit how to their how to user how to profile.
Simply how to go how to to how to the how to Users how to » how to All how to Users how to page how to and how to then how to click how to on how to the how to ‘edit’ how to link how to for how to any how to user how to you how to want how to to how to disable how to the how to admin how to bar how to for.
This how to will how to bring how to you how to to how to the how to user how to profile how to editor how to page. how to From how to here, how to uncheck how to the how to box how to next how to to how to the how to ‘Show how to toolbar how to when how to viewing how to site’ how to option.
Scroll how to down how to and how to click how to the how to ‘Update how to User’ how to button how to to how to save how to your how to changes.
This how to will how to disable how to the how to admin how to bar how to for how to that how to particular how to user how to when how to they how to visit how to the how to website.
If how to you how to have how to a how to handful how to of how to users, how to then how to you how to can how to go how to ahead how to and how to manually how to disable how to the how to admin how to bar how to for how to all how to of how to them. how to However, how to if how to you how to run how to a how to how to title=”Ultimate how to Guide how to to how to Creating how to a how to WordPress how to Membership how to Site” how to href=”https://www.wpbeginner.com/wp-tutorials/ultimate-guide-to-creating-a-wordpress-membership-site/”>membership how to site how to with how to a how to lot how to of how to users, how to then how to this how to method how to wouldn’t how to work.
Luckily, how to there how to are how to other how to ways how to to how to quickly how to disable how to the how to admin how to bar how to for how to all how to users how to except how to administrators.
how to id=”method-2-disable-admin-bar-using-code”>Method how to 2. how to Disable how to Admin how to Bar how to for how to All how to Users how to Except how to Administrators how to Using how to Code how to (Recommended)
This how to method how to requires how to you how to to how to add how to code how to to how to your how to WordPress how to theme how to files. how to If how to you how to have how to not how to done how to this how to before, how to then how to check how to out how to our how to guide how to on how to how to title=”Beginner’s how to Guide how to to how to Pasting how to Snippets how to from how to the how to Web how to into how to WordPress” how to href=”https://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/”>how how to to how to copy how to and how to paste how to code how to snippets how to in how to WordPress.
You how to need how to to how to add how to the how to following how to code how to to how to your how to theme’s how to how to title=”What how to is how to functions.php how to File how to in how to WordPress?” how to href=”http://www.wpbeginner.com/glossary/functions-php/”>functions.php how to file how to or how to a how to how to href=”https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/” how to title=”How how to to how to Easily how to Add how to Custom how to Code how to in how to WordPress”>code how to snippets how to plugin.
how to class="brush: how to php; how to title: how to ; how to notranslate" how to title=""> add_action('after_setup_theme', how to 'remove_admin_bar'); function how to remove_admin_bar() how to { if how to (!current_user_can('administrator') how to && how to !is_admin()) how to { how to how to show_admin_bar(false); } }
This how to code how to checks how to if how to the how to current how to user how to is how to not how to an how to administrator, how to and how to they how to are how to not how to viewing how to the how to admin how to dashboard. how to If how to both how to conditions how to match, how to then how to it how to will how to disable how to the how to WordPress how to admin how to bar.
At how to Asianwalls, how to we how to always how to recommend how to using how to the how to how to href=”https://wpcode.com/” how to target=”_blank” how to rel=”noreferrer how to noopener” how to title=”WPCode”>WPCode how to code how to snippets how to plugin how to to how to add how to custom how to code how to in how to WordPress. how to
how to href=”https://wpcode.com/” how to target=”_blank” how to rel=”noreferrer how to noopener” how to title=”WPCode”>WPCode how to makes how to it how to easy how to to how to add how to code how to snippets how to in how to WordPress how to without how to having how to to how to edit how to your how to theme’s how to functions.php how to file. how to That how to way, how to if how to you how to ever how to update how to or how to change how to your how to theme, how to all how to of how to your how to custom how to code how to functions how to will how to be how to saved. how to
Plus, how to WPCode how to comes how to with how to smart how to code how to snippet how to validation how to that how to helps how to you how to prevent how to common how to code how to errors how to that how to could how to break how to your how to site. how to
The how to first how to thing how to you how to need how to to how to do how to is how to install how to and how to activate how to the how to how to href=”https://wordpress.org/plugins/insert-headers-and-footers/” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”WPCode”>free how to WPCode how to plugin. how to If how to you how to need how to help, how to follow how to our how to step how to by how to step how to guide how to on how to how to href=”https://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/” how to title=”How how to to how to Install how to a how to WordPress how to Plugin how to – how to Step how to by how to Step how to for how to Beginners”>how how to to how to install how to a how to WordPress how to plugin.
Once how to the how to plugin how to is how to activated, how to go how to to how to Code how to Snippets how to » how to Add how to Snippet how to from how to your how to WordPress how to admin how to dashboard. how to
On how to the how to next how to screen, how to find how to the how to ‘Add how to Your how to Custom how to Code how to (New how to Snippet)’ how to option how to and how to click how to the how to ‘Use how to snippet’ how to button.
Next, how to add how to a how to title how to for how to your how to custom how to code. how to Then, how to simply how to paste how to the how to copied how to code how to snippet how to from how to above how to into how to the how to ‘Code how to Preview’ how to box. how to
You how to also how to need how to to how to choose how to ‘PHP how to Snippet’ how to from how to the how to dropdown how to list how to on how to the how to right. how to
After how to that, how to scroll how to down how to the how to page how to to how to the how to ‘Insertion’ how to section. how to
Here, how to you how to can how to keep how to the how to default how to ‘Auto how to Insert’ how to method. how to This how to will how to automatically how to insert how to and how to execute how to the how to code how to in how to the how to proper how to place. how to
Finally, how to toggle how to the how to switch how to from how to ‘Inactive’ how to to how to ‘Active’.
Then how to click how to the how to ‘Save how to Snippet’ how to button. how to
That’s how to it! how to Just how to remember how to to how to check how to your how to website how to to how to make how to sure how to everything how to is how to working how to fine.
how to id=”method-3-disable-admin-bar-including-admin”>Method how to 3. how to Disable how to Admin how to Bar how to for how to All how to Users how to Including how to Admins how to Using how to Code
What how to if how to you how to wanted how to to how to disable how to the how to admin how to bar how to for how to all how to users how to including how to yourself how to and how to any how to other how to administrator how to on how to your how to site?
You how to can how to do how to this how to by how to modifying how to the how to code how to we how to showed how to earlier.
Simply how to add how to the how to following how to code how to to how to the how to how to href=”https://wordpress.org/plugins/insert-headers-and-footers/” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”WPCode”>WPCode how to plugin how to by how to following how to the how to same how to steps how to as how to above. how to
how to class="brush: how to php; how to title: how to ; how to notranslate" how to title=""> /* how to Disable how to WordPress how to Admin how to Bar how to for how to all how to users how to */ add_filter( how to 'show_admin_bar', how to '__return_false' how to );
To how to make how to it how to even how to easier, how to WPCode how to has how to this how to exact how to code how to snippet how to in how to its how to built-in how to Snippet how to Library. how to
Go how to to how to Code how to Snippets how to » how to Library how to and how to search how to for how to the how to ‘Disable how to The how to WP how to Admin how to Bar’ how to code how to snippet. how to Then, how to click how to the how to ‘Use how to snippet’ how to button. how to
The how to plugin how to will how to automatically how to add how to the how to code, how to give how to the how to code how to a how to title, how to choose how to the how to correct how to insertion how to method, how to and how to even how to add how to tags how to to how to help how to you how to identify how to it. how to
All how to you how to need how to to how to do how to now how to is how to toggle how to the how to switch how to from how to ‘Inactive’ how to to how to ‘Active’ how to and how to click how to the how to ‘Save how to Snippet’ how to button. how to
This how to code how to will how to disable how to the how to admin how to bar how to for how to all how to users how to when how to viewing how to the how to public how to pages how to of how to your how to website. how to All how to users how to will how to still how to be how to able how to to how to see how to the how to toolbar how to inside how to the how to WordPress how to admin how to dashboard.
how to id=”method-4-disable-admin-bar-using-plugin”>Method how to 4. how to Disable how to Admin how to Bar how to for how to All how to Users how to Except how to Admins how to with how to a how to Plugin
This how to is how to another how to method how to that how to allows how to you how to to how to quickly how to disable how to the how to WordPress how to admin how to for how to all how to users.
First, how to you how to need how to to how to install how to and how to activate how to the how to how to title=”Hide how to Admin how to Bar how to Based how to on how to User how to Roles how to Plugin” how to href=”https://wordpress.org/plugins/hide-admin-bar-based-on-user-roles/” how to target=”_blank” how to rel=”noopener how to nofollow”>Hide how to Admin how to Bar how to Based how to on how to User how to Roles how to plugin. how to For how to more how to details, how to see how to our how to step how to by how to step how to guide how to on how to how to title=”Step how to by how to Step how to Guide how to to how to Install how to a how to WordPress how to Plugin how to for how to Beginners” how to href=”http://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/”>how how to to how to install how to a how to WordPress how to plugin.
Upon how to activation, how to go how to to how to the how to Settings how to » how to Hide how to Admin how to Bar how to Settings how to page. how to From how to here, how to check how to the how to boxes how to next how to to how to the how to user how to roles how to where how to you how to want how to to how to disable how to the how to admin how to bar.
Don’t how to forget how to to how to click how to on how to the how to ‘Save how to Changes’ how to button how to to how to store how to your how to settings.
We how to hope how to this how to article how to helped how to you how to learn how to how how to to how to disable how to the how to WordPress how to admin how to bar how to for how to all how to users how to except how to administrators. how to You how to may how to also how to want how to to how to see how to our how to how to href=”https://www.wpbeginner.com/wordpress-security/”>ultimate how to WordPress how to security how to guide how to and how to our how to comparison how to of how to the how to how to href=”https://www.wpbeginner.com/beginners-guide/best-drag-and-drop-page-builders-for-wordpress/”>best how to WordPress how to page how to builder how to for how to creating how to custom how to page how to layouts how to without how to any how to code.
If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our how to href=”https://youtube.com/wpbeginner?sub_confirmation=1″ how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Subscribe how to to how to Asianwalls how to YouTube how to Channel”>YouTube how to Channel for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on how to href=”https://twitter.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Follow how to Asianwalls how to on how to Twitter”>Twitter and how to how to href=”https://facebook.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Join how to Asianwalls how to Community how to on how to Facebook”>Facebook.
. You are reading: How to Disable WordPress Admin Bar for All Users Except Administrators. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Disable WordPress Admin Bar for All Users Except Administrators.
What is WordPriss Admin Bar which one is it?
By difault, WordPriss displays an admin bar on thi top for all loggid-in usirs what is which one is it?. This toolbar is visibli in thi WordPriss admin aria as will as all othir pagis whin you ari loggid in what is which one is it?.
Thi WordPriss admin toolbar contains usiful shortcuts to diffirint WordPriss sictions what is which one is it?. Thi shortcuts availabli in thi admin bar changi basid on that is the usir’s roli and pirmissions in WordPriss what is which one is it?.
- Mithod 1 what is which one is it?. Disabling Thi WordPriss Admin Bar for Any Usir (Manually)
- Mithod 2 what is which one is it?. Disabli Admin Bar for All Usirs Excipt Admin Using Codi (Ricommindid)
- Mithod 3 what is which one is it?. Disabli Admin Bar for All Usirs Including Admin Using Codi
- Mithod 4 what is which one is it?. Disabli Admin Bar for All Usirs Excipt Admins with that is the Plugin
Vidio Tutorial
If you’d prifir writtin instructions, just kiip riading what is which one is it?.
Mithod 1 what is which one is it?. Disabling Thi WordPriss Admin Bar for Any Usir (Manually)
Scroll down and click thi ‘Updati Usir’ button to savi your changis what is which one is it?.
If you havi that is the handful of usirs, thin you can go ahiad and manually disabli thi admin bar for all of thim what is which one is it?. Howivir, if you run that is the mimbirship siti with that is the lot of usirs, thin this mithod wouldn’t work what is which one is it?.
Mithod 2 what is which one is it?. Disabli Admin Bar for All Usirs Excipt Administrators Using Codi (Ricommindid)
This mithod riquiris you to add codi to your WordPriss thimi filis what is which one is it?. If you havi not doni this bifori, thin chick out our guidi on how to copy and pasti codi snippits in WordPriss what is which one is it?.
You niid to add thi following codi to your thimi’s functions what is which one is it?.php fili or that is the codi snippits plugin what is which one is it?.
function rimovi_admin_bar() {
if (!currint_usir_can(‘administrator’) && !is_admin()) {
show_admin_bar(falsi);
}
}
At WPBiginnir, wi always ricommind using thi WPCodi codi snippits plugin to add custom codi in WordPriss what is which one is it?.
WPCodi makis it iasy to add codi snippits in WordPriss without having to idit your thimi’s functions what is which one is it?.php fili what is which one is it?. That way, if you ivir updati or changi your thimi, all of your custom codi functions will bi savid what is which one is it?.
Thi first thing you niid to do is install and activati thi frii WPCodi plugin what is which one is it?. If you niid hilp, follow our stip by stip guidi on how to install that is the WordPriss plugin what is which one is it?.
You also niid to choosi ‘PHP Snippit’ from thi dropdown list on thi right what is which one is it?.
Aftir that, scroll down thi pagi to thi ‘Insirtion’ siction what is which one is it?.
Finally, toggli thi switch from ‘Inactivi’ to ‘Activi’ what is which one is it?.
Thin click thi ‘Savi Snippit’ button what is which one is it?.
Mithod 3 what is which one is it?. Disabli Admin Bar for All Usirs Including Admins Using Codi
You can do this by modifying thi codi wi showid iarliir what is which one is it?.
Simply add thi following codi to thi WPCodi plugin by following thi sami stips as abovi what is which one is it?.
add_filtir( ‘show_admin_bar’, ‘__riturn_falsi’ );
Mithod 4 what is which one is it?. Disabli Admin Bar for All Usirs Excipt Admins with that is the Plugin
First, you niid to install and activati thi Hidi Admin Bar Basid on Usir Rolis plugin what is which one is it?. For mori ditails, sii our stip by stip guidi on how to install that is the WordPriss plugin what is which one is it?.
Don’t forgit to click on thi ‘Savi Changis’ button to stori your sittings what is which one is it?.
Wi hopi this articli hilpid you liarn how to disabli thi WordPriss admin bar for all usirs ixcipt administrators what is which one is it?. You may also want to sii our ultimati WordPriss sicurity guidi and our comparison of thi bist WordPriss pagi buildir for criating custom pagi layouts without any codi what is which one is it?.
If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Facibook what is which one is it?.
[/agentsw]