{"id":68606,"date":"2022-11-11T15:51:45","date_gmt":"2022-11-11T15:51:45","guid":{"rendered":"\/tutorials\/?p=68606"},"modified":"2026-03-09T19:18:22","modified_gmt":"2026-03-09T19:18:22","slug":"wordpress-hide-admin-bar","status":"publish","type":"post","link":"\/ng\/tutorials\/wordpress-hide-admin-bar","title":{"rendered":"How to hide the WordPress admin bar using a plugin, PHP code, and via the user settings"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>When logged-in users access a WordPress website, they can quickly access tools and shortcuts from the admin bar at the top. While useful, some developers might need to hide it for security reasons and visual improvements.<\/p><p>In this article, we will explain how to hide the WordPress admin bar for all users as well as specific roles only. We will also explore three methods with different difficulty levels so you can choose one based on your preferences.<\/p><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-hide-the-wordpress-admin-bar\">How to hide the WordPress admin bar<\/h2><p>Before proceeding, we recommend <a href=\"\/ng\/tutorials\/backup-wordpress\">backing up your WordPress website<\/a> so you can easily restore your data in case of errors.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-using-a-plugin\">1. Using a plugin<\/h3><p>If you are unfamiliar with coding, using a WordPress plugin is the easiest way to hide the admin toolbar. This method is also convenient because you can easily revert the changes without altering your website code.<\/p><p>While you can use different WordPress plugins, we recommend <a href=\"https:\/\/wordpress.org\/plugins\/hide-admin-bar-based-on-user-roles\/\">Hide Admin Bar Based on User Roles<\/a>. It offers various options to hide the toolbar and provides frequent updates to ensure security. Here&rsquo;s how to use it:<\/p><ol class=\"wp-block-list\">\n<li>Log in to your <strong>WordPress dashboard<\/strong> and navigate to the <strong>sidebar<\/strong> &rarr; <strong>Plugins<\/strong> &rarr; <strong>Add New Plugin<\/strong>.<\/li>\n\n\n\n<li>Search <strong>Hide Admin Bar Based on User Roles<\/strong> and click <strong>Install Now<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a95e166\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1457\" height=\"497\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-hide-admin-bar-based-on-user-roles-plugin-in-wordpress-plugin-installation-menu.png\/public\" alt=\"The Hide Admin Bar Based on User Roles plugin in WordPress plugin installation menu\" class=\"wp-image-115108\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-hide-admin-bar-based-on-user-roles-plugin-in-wordpress-plugin-installation-menu.png\/w=1457,fit=scale-down 1457w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-hide-admin-bar-based-on-user-roles-plugin-in-wordpress-plugin-installation-menu.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-hide-admin-bar-based-on-user-roles-plugin-in-wordpress-plugin-installation-menu.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-hide-admin-bar-based-on-user-roles-plugin-in-wordpress-plugin-installation-menu.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-hide-admin-bar-based-on-user-roles-plugin-in-wordpress-plugin-installation-menu.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1457px) 100vw, 1457px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\" start=\"3\">\n<li>Once the <a href=\"\/ng\/tutorials\/wordpress\/how-to-install-wordpress-plugins\">plugin installation<\/a> process is complete, click <strong>Activate<\/strong>.&nbsp;<\/li>\n\n\n\n<li>Head to the <strong>sidebar<\/strong> &rarr; <strong>Settings <\/strong>&rarr; <strong>Hide Admin Bar Settings<\/strong>.&nbsp;<\/li>\n\n\n\n<li>Choose the user roles you want to hide the top admin bar from by clicking their respective boxes. Once finished, hit<strong> Save Changes<\/strong>.&nbsp;<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9611cd\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"855\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/hide-admin-bar-based-on-user-roles-settings-page.png\/public\" alt=\"Hide Admin Bar Based on User Roles Settings page\" class=\"wp-image-115109\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/hide-admin-bar-based-on-user-roles-settings-page.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/hide-admin-bar-based-on-user-roles-settings-page.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/hide-admin-bar-based-on-user-roles-settings-page.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/hide-admin-bar-based-on-user-roles-settings-page.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/hide-admin-bar-based-on-user-roles-settings-page.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>That&rsquo;s it! If you want to show the admin bar again, return to the settings menu, untick the box, and save the changes.<\/p><p><div><p class=\"important\"><strong>Important!<\/strong> Update your plugin periodically to avoid security risks. For <a href=\"\/ng\/wordpress-hosting\">Hostinger managed WordPress hosting<\/a> users, we recommend enabling the auto-update feature to simplify the task.<\/p><\/div>\n\n\n<?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-wordpress-hosting\" href=\"\/ng\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"600\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/public\" alt=\"\" class=\"wp-image-111781\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=2048,fit=scale-down 2048w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=1536,fit=scale-down 1536w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-2-using-php-code\">2. Using PHP code<\/h3><p>Installing too many plugins might cause performance issues and security risks if you don&rsquo;t audit them properly. In this case, you might want to hide the WordPress admin bar manually by <a href=\"\/ng\/tutorials\/wordpress\/how-to-add-php-code-to-wordpress-post-or-page\">adding custom PHP code to your WordPress<\/a> theme file.<\/p><p><div class=\"protip\">\n                    <h4 class=\"title\">Pro Tip<\/h4>\n                    <p> If you are unfamiliar with PHP, we recommend testing the code snippets in a <a href=\"\/ng\/tutorials\/wordpress-staging-environment\">WordPress staging area<\/a> to avoid breaking the live website.<\/p>\n                <\/div>\n\n\n\n<\/p><p>Before doing so, <a href=\"\/ng\/tutorials\/how-to-create-wordpress-child-theme\">create and activate a child theme<\/a> to ensure your custom PHP remains after an update. Now, let&rsquo;s proceed with the steps for hiding the admin bar:<\/p><ol class=\"wp-block-list\">\n<li>Open your<strong> WordPress admin are<\/strong>a &rarr; <strong>sidebar<\/strong> &rarr; <strong>Tools<\/strong> &rarr; <strong>Theme File Editor<\/strong>.<\/li>\n\n\n\n<li>Head to the <strong>Theme Files <\/strong>side menu on the right. Select the <a href=\"\/ng\/tutorials\/functions-php-wordpress\"><strong>functions.php<\/strong><\/a><strong> <\/strong>file.&nbsp;<\/li>\n\n\n\n<li>From the code editor screen, add the following snippet at the bottom of the file before the <strong>?&gt;<\/strong> closing tag:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">add_filter('show_admin_bar', '__return_false');<\/pre><ol class=\"wp-block-list\" start=\"4\">\n<li>Click <strong>Update File<\/strong>.&nbsp;<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a964925\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"755\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/php-code-for-hiding-the-admin-bar-in-the-theme-file-editor-screen.png\/public\" alt=\"PHP code for hiding the admin bar in the Theme File Editor screen\" class=\"wp-image-115111\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/php-code-for-hiding-the-admin-bar-in-the-theme-file-editor-screen.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/php-code-for-hiding-the-admin-bar-in-the-theme-file-editor-screen.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/php-code-for-hiding-the-admin-bar-in-the-theme-file-editor-screen.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/php-code-for-hiding-the-admin-bar-in-the-theme-file-editor-screen.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/php-code-for-hiding-the-admin-bar-in-the-theme-file-editor-screen.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Note that the snippet above will hide the WordPress admin bar for all users, regardless of their roles.<\/p><p>If you want to hide the admin bar for a specific account role, use the following code instead. For example, we will disable the toolbar for those with the subscriber role:<\/p><pre class=\"wp-block-preformatted\">if (current_user_can('subscriber')) {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;add_filter('show_admin_bar', '__return_false');<br><br>}<\/pre><p>With this code, you can also hide the admin bar for all users except for a specific role. For instance, we will show the toolbar only for those with administrative privileges:<\/p><pre class=\"wp-block-preformatted\">add_action('after_setup_theme', 'remove_admin_bar');<br><br>function remove_admin_bar() {<br><br>if (!current_user_can('administrator') &amp;&amp; !is_admin()) {<br><br>show_admin_bar(false); }<br><br>}<\/pre><p>To revert the changes, simply delete the code from the <strong>PHP<\/strong> file and save the changes.<\/p><h3 class=\"wp-block-heading\" id=\"h-3-via-user-settings\">3. Via user settings<\/h3><p>As an administrator, you can easily disable the WordPress admin bar for specific users via the account settings menu. Here&rsquo;s how to do so:<\/p><ol class=\"wp-block-list\">\n<li>Log in to the <strong>WordPress admin dashboard<\/strong> &rarr; <strong>sidebar<\/strong> &rarr; <strong>Users<\/strong> &rarr; <strong>All Users<\/strong>.<\/li>\n\n\n\n<li>Hover over the account you want to hide the admin bar from and click <strong>Edit <\/strong>profile.<\/li>\n\n\n\n<li>Go to the <strong>Toolbar<\/strong> setting and untick the box.&nbsp;<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9664f0\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"192\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-toolbar-toggle-in-wordpress-user-setting-menu.png\/public\" alt=\"The Toolbar toggle in WordPress user setting menu\" class=\"wp-image-115112\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-toolbar-toggle-in-wordpress-user-setting-menu.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-toolbar-toggle-in-wordpress-user-setting-menu.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-toolbar-toggle-in-wordpress-user-setting-menu.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-toolbar-toggle-in-wordpress-user-setting-menu.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/09\/the-toolbar-toggle-in-wordpress-user-setting-menu.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\" start=\"4\">\n<li>Scroll down to the bottom and click <strong>Update User<\/strong> to save the changes.<\/li>\n<\/ol><p>Now, when the user logs in, they won&rsquo;t see the admin bar. Remember that this method only hides the toolbar for a specific user, meaning you must repeat the steps to apply the changes to multiple accounts within the same role.<\/p><p>Also, you can only manage other users&rsquo; settings if you are logged in as an administrator. Otherwise, you must manually log in to that account and change its configuration.<\/p><h2 class=\"wp-block-heading\" id=\"h-why-should-you-hide-the-wordpress-admin-bar\">Why should you hide the WordPress admin bar?<\/h2><p>Developers opt to hide the WordPress admin bar for various reasons. Here are some common considerations why you might want to do so:<\/p><ul class=\"wp-block-list\">\n<li><strong>Security concerns<\/strong>. The WordPress admin bar provides shortcuts to various functions that can alter your website, including editing posts and accessing the dashboard. Hiding the toolbar limits potential entry points that unauthorized users might exploit.&nbsp;<\/li>\n\n\n\n<li><strong>Visual enhancement<\/strong>. Users might find the WordPress admin bar ruining the web page&rsquo;s appearance. Hiding it helps improve the website&rsquo;s visuals and maintain consistency across all users.&nbsp;<\/li>\n\n\n\n<li><strong>Functionality<\/strong>. For logged-in users, the top admin bar at the top of the web page might obstruct important parts of the website. For example, it might prevent them from accessing the search bar or navigation menu.<\/li>\n\n\n\n<li><strong>User control<\/strong>. Administrators might hide the WordPress admin bar to <a href=\"\/ng\/tutorials\/create-manage-wordpress-user-roles-permissions\">manage user roles<\/a> and access permissions over the website.&nbsp;<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>WordPress admin bar offers quick-access tools and shortcuts for various functions. However, developers might want to hide it due to potential security risks and visual obstructions.<\/p><p>In this article, we have explained multiple ways to temporarily remove the admin bar. Here&rsquo;s the recap:<\/p><ul class=\"wp-block-list\">\n<li><strong>Using plugin<\/strong>. This method is ideal for beginners with minimal coding experience. Install plugins like Hide Admin Bar Based on Roles on WordPress and disable the toolbar via Settings.<\/li>\n\n\n\n<li><strong>Adding PHP code<\/strong>. Developers can hide the admin bar by adding PHP functions and filters to the <strong>functions.php<\/strong> file. You can apply the setting for specific user roles using the <strong>if<\/strong> statement.&nbsp;<\/li>\n\n\n\n<li><strong>Via user settings<\/strong>. Admin users can hide the admin bar for a specific account by unchecking the <strong>Toolbar<\/strong> option in the settings menu. If you don&rsquo;t have the privilege, you must log in to that particular account first.<\/li>\n<\/ul><p>We hope this article helped you choose a suitable method for hiding the WordPress admin bar on your website. If you have any questions, leave us a comment below!<\/p><h2 class=\"wp-block-heading\" id=\"h-hide-wordpress-admin-bar-faq\">Hide WordPress admin bar FAQ<\/h2><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1725374609024\"><h3 class=\"schema-faq-question\">What is the WordPress admin bar?<\/h3> <p class=\"schema-faq-answer\">WordPress admin bar is a top menu that logged-in users see when accessing a website. It provides quick access to various tools and shortcuts, including redirecting you to the post editor or the WordPress admin dashboard.&nbsp;<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1725374615182\"><h3 class=\"schema-faq-question\">Do I need the WordPress admin bar?<\/h3> <p class=\"schema-faq-answer\">It depends on your needs. If you want to quickly edit a post or access tools without opening the WordPress dashboard, then you need the toolbar. However, if you are concerned about security and visibility issues, we recommend hiding it.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1725374620399\"><h3 class=\"schema-faq-question\">Will hiding the admin bar affect my WordPress site?<\/h3> <p class=\"schema-faq-answer\">Hiding the admin bar won&rsquo;t affect other aspects of your WordPress site. You can also easily revert the changes by uninstalling the plugin or deleting the PHP code. However, we always recommend backing up your WordPress before making any changes.<\/p> <\/div> <\/div><p><\/p><p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When logged-in users access a WordPress website, they can quickly access tools and shortcuts from the admin bar at the top. While useful, some developers might need to hide it for security reasons and visual improvements. In this article, we will explain how to hide the WordPress admin bar for all users as well as [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ng\/tutorials\/wordpress-hide-admin-bar\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":337,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to hide WordPress admin bar: 3 effective methods","rank_math_description":"Learn the three methods to hide the WordPress admin bar \u2013 using the Hide Admin Bar plugin, using a custom code, and via the user settings.","rank_math_focus_keyword":"wordpress hide admin bar","footnotes":""},"categories":[22637],"tags":[],"class_list":["post-68606","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/wordpress-hide-admin-bar","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/wordpress-hide-admin-bar","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/wordpress-hide-admin-bar","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/wordpress-hide-admin-bar","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/wordpress-hide-admin-bar","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/wordpress-hide-admin-bar","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/wordpress-hide-admin-bar","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/wordpress-hide-admin-bar","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/68606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/users\/337"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/comments?post=68606"}],"version-history":[{"count":14,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/68606\/revisions"}],"predecessor-version":[{"id":144297,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/68606\/revisions\/144297"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media?parent=68606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/categories?post=68606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/tags?post=68606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}