Fix Missing Admin Bar Issue in WordPress

Fix Missing Admin Bar Issue in WordPress

The admin bar is one of the most useful tools that WordPress has for its logged-in users. It offers a faster way of creating new pages and posts, accessing various sections within the dashboard, as well as reaching plugin and theme options directly from the frontend of the website. This makes the admin bar a popular tool used daily by every logged-in WordPress user.

Given all that, it could be quite an inconvenience if, suddenly, you weren’t able to use these admin bar shortcuts, and were forced to navigate using the WordPress dashboard only. This can happen when the admin bar goes missing, which could be due to one of several reasons. Sometimes, the admin bar can vanish entirely and, sometimes, a white bar could be present on the same spot instead of the admin bar.

Missing admin bar
Missing admin bar on page

Regardless of how this error is displayed on your end, we will explain the troubleshooting steps you need to take when your WordPress admin bar is missing. We’ll cover a range of potential causes by going through various solutions:

How to Fix the Missing Admin Bar Issue in WordPress

Since the admin bar can only be displayed for logged-in users, it is important to verify that you are logged in before trying any of the troubleshooting steps mentioned below. You can do this by navigating to your login URL. This is the address usually created by adding /wp-admin at the end of your website URL. If you are logged in, you will be redirected to your website’s WordPress dashboard, otherwise, you will see the WordPress login screen.

WP Login

After confirming that you are logged in, open one of your pages in the frontend to see if the issue is still present. If your WordPress admin bar is still missing, you should proceed with the troubleshooting steps described below.

The steps we cover tackle various reasons for this issue, starting from the most common ones to very specific, niche situations. As some of the methods we’ll go over involve editing template files, you should make a backup of your website beforehand, just in case. Once you’ve done that, we can begin.

Enabling the Show Toolbar Option

The most common reason for a missing admin bar is that you disabled the Show Toolbar option, accidentally or otherwise. Therefore, the first step is to check if this option is enabled and to turn it on if it isn’t, in the hopes that this will solve the issue.

To check the status of the Show Toolbar option, navigate to Users > Profile. If your user role is non-administrative, you only need to navigate to Profile, since you won’t have access to the data of all other users. Next, locate the Toolbar option in the Personal Options section near the top of the screen. Then, make sure that the checkbox next to the Show Toolbar when viewing site option is checked. If it isn’t, check it, and press the Update Profile button at the bottom.

Show toolbar

Once you’ve done that, stay logged in and open one of your pages to see if the admin bar is present on the frontend.

Clearing Cache and Cookies

In most cases, the missing admin bar issue will be resolved by enabling the Show Toolbar option as described in the previous step. However, if it isn’t, don’t worry. The issue may have gotten resolved but you weren’t aware of it because of caching issues. We advise clearing your cache and cookies to check if this is the case for you as well.

Furthermore, we suggest clearing cache and cookies after each of the other troubleshooting methods covered in this article. This will help you properly test the efficiency of the methods you try, as you will be seeing the latest, up-to-date, version of your page.

To clear browser cache and cookies in Chrome, click on the three dots in the top right corner. Then, hover over the History option and click on the second History option that appears in the submenu. This will open the History page within the Chrome browser. You can also access this page manually by typing in chrome://history/ in the address bar.

Chrome history

Next, select the Clear browsing data option from the menu on the left.

Clear browsing data option

This will open the browser clearing popup window. The popup window has two tabs—Basic and Advanced, with the Basic open by default. Choose the time range and what type of data you wish to delete and click on the Clear data button below to clear your browsing data. If you want more control regarding what data you delete, switch to the Advanced tab and make the adjustments you want before clearing your data.

Make the adjustments you-want before clearing your data

Afterward, check your pages to see if the admin bar has returned. If it hasn’t, try to clear all other forms of cache your website could have, such as the plugin and server cache.

If you are using a caching plugin, you will likely have a separate option or set of options for clearing cache. For example, with the W3 Total Cache plugin, that option is located in the admin bar. In cases like these, you would need to log in to the WordPress admin dashboard and access the plugin options from there. For the W3 Total Cache plugin, hover over the Performance option, then select the Purge All Caches option from the submenu.

Purge All Caches option

Afterward, check the frontend of one of your pages to see if the admin bar has reappeared.

Finally, if the admin bar is still not present after clearing both the browser and plugin cache, you should try to delete the server cache (provided it is enabled on your server) as well. To do so, you will need to contact your hosting provider and ask them to clear any server caching. Once they’ve done that, you should check the status of the admin bar using the frontend of one of your pages.

Qode Themes: Top Picks
Bridge New Banner

Creative Multi-Purpose WordPress Theme

Stockholm WordPress Theme

A Genuinely Multi-Concept Theme

Startit WordPress Theme

Fresh Startup Business Theme

Deactivating Plugins

Apart from the two reasons mentioned above, another of the more common reasons why the WordPress admin bar could be missing is a faulty plugin. This could be due to an error in the plugin files or a piece of code that hides the admin bar. Therefore, the following troubleshooting suggestion involves deactivating all your plugins, one at a time, until you find the one causing the issue.

Navigate to Plugins > Installed Plugins to see the list of all your installed plugins. Then, press the Deactivate button next to each plugin, one at a time.

Deactivating plugins

After you deactivate a plugin, reload the page where you are checking for your admin bar. Repeat the same process—keep checking the page after each deactivation—until the admin bar reappears. When the admin bar reappears, you’ll know the last plugin you deactivated is the culprit. To avoid having this issue again, we advise asking the plugin authors for help with sorting out the plugin. We also advise supplying the plugin authors with the error log, as it can speed up the process of resolving the error.

Deactivating the Theme

If you’ve gone through all your plugins and weren’t successful in solving this issue, it is time to apply the same troubleshooting method to your theme. Meaning, you should switch to a default theme to test if your current theme is causing the admin bar to vanish. If you haven’t got a default theme installed on your website, you should go to the WordPress theme repository, download a theme, and install it on your website first.

After that, navigate to Appearance > Themes and locate the default WordPress theme. Hover over it and press the Activate button that appears.

Press the Activate button

Shortly after, you will receive a success message stating that the new theme has been activated. Then, you should check a page from your website to see if the issue has been resolved. You can do that either by pressing on the Visit site link or by manually reloading one of your already opened pages.

Visit site link

If the admin bar reappears after switching themes, it confirms that your current theme is the culprit. This could be due to an error in the files or if a key function isn’t being used. One example of the latter is not having the wp_footer() function included before the closing </body> tag in the footer.php file. However, this is a less common reason for the issue than it used to be, as adding the wp_footer() function in the appropriate place has become a part of the WordPress coding standards now. So it could mean your theme is simply out of date.

Another reason for the missing admin bar could be that the theme includes some kind of code, PHP or CSS, that hides the admin bar. Whichever the case might be, if you determine your theme caused the issue, we advise contacting the theme authors for help. Furthermore, we also suggest going through with the next two methods—editing the functions.php and enabling WordPress debugging as well. They can help you narrow down the cause of the issue further or even solve it.

Editing the functions.php file

If you’ve pinpointed that the admin bar is missing because of your theme, we advise looking into its functions.php file. The admin bar can be disabled with a simple one-line snippet of code that is usually added in the functions.php file. This snippet could have been added by some of your other users or even, unknowingly, you. Therefore, it’s worth investigating your functions.php file. Before proceeding, we suggest brushing up on your knowledge of FTP, as it will be required for the steps below.

Then, connect to your server using your FTP credentials and navigate to your root WordPress directory, often called public_html.

Editing the functions php file

Navigate to /wp-content/themes and click on the directory of your current theme to open it. Then, locate the functions.php file within, right-click on it, and select the View/Edit option.

Click on the directory of your current theme

Open the file using any text editor and check its content carefully. You will be looking for the following piece of code that disables the admin bar:

add_filter( 'show_admin_bar', '__return_false' );

After finding that code, simply delete it and save the changes you made to the file.

Simply delete code

Then, upload the file back to the server to overwrite the old file that’s currently there. After that, examine one of your pages to see if the admin bar has reappeared.

However, if you weren’t able to find the above-mentioned line of code, there is one more thing you can try with your functions.php file. Try adding the following line of code at the end of the file:

add_filter( 'show_admin_bar', '__return_true' );

The steps to do this are the same as described above; the only difference is that you would be inserting a line of code instead of removing it.

This new line forces the admin bar to show. It would override any code created to hide the admin bar that might be present in one of your plugins. After adding this line of code, make sure to check the status of your admin bar. If it is still missing even after clearing the browser cache and examining the page, you should remove the line of code you just added and proceed to the next troubleshooting method.

Enabling WordPress Debugging

If the issue was caused by an error in the code, either in the theme or plugin files, you will be able to pinpoint the exact file and line of code by reviewing the error log. You should also enable debugging in WordPress, as it will indicate any warnings and errors on the screen if they exist.

To enable debugging in WordPress, connect to your server using your FTP credentials and navigate to your root WordPress directory, often called public_html.

Editing the functions php file

Locate the wp-config.php file, right-click on it, and select the View/Edit option.

Locate the wp config php file

Open the file using any text editor and insert the following line of code above the /* That’s all, stop editing! Happy blogging. */ comment line:

define('WP_DEBUG', true);
Insert the following line of code

Afterward, save the changes you made to the file and upload it back to the server to overwrite the old file that’s currently there.

Then, open one of your pages and check for errors, if any, that are shown on the screen. Depending on what the errors indicate, you should let your theme or plugin authors know about them. This knowledge could be very useful in solving the error and retrieving your missing WordPress admin bar quickly.

Reviewing the Additional CSS

If you tried all the options mentioned above, you can explore the more uncommon reasons for this issue. Namely, the admin bar could be hidden with some of the CSS code you added to the website. It might sound unlikely, but users often copy unverified code to their site and it ends up causing them problems. In the section below, we’ll show how to investigate if this is the case with you.

After logging into your admin dashboard, navigate to Appearance > Customize > Additional CSS and review all the CSS that you added here. The ID used for the admin bar is wpadminbar, which means you will have to look for CSS code in the format given below.

#wpadminbar {
// Some CSS code here

Unfortunately, as there are quite a few possible ways of hiding the admin bar with CSS, we can’t tell you exactly how the code will look. However, we will include the three most common CSS rules for hiding an element, to give you an idea of what to look for. Those are:

  • display: none;
  • visibility: hidden;
  • opacity: 0;

After finding the code that hides the admin bar, remove it, and click on the Publish button to save your settings. You can also copy the CSS code you find in a text document to save it for further examination before removing it from your site.

Remove the code

As with all other steps, when you remove the code, open one of your pages to see if the issue has been resolved. Also, remember to clear the browser cache before viewing the page.

Final Thoughts

If your WordPress admin bar is missing, and this is slowing down your work, and you’re without the shortcuts you’re used to, then follow our guide to fix this issue. Having your admin bar vanish might not be as dire as losing access to your WordPress dashboard, but it can still cause difficulties. Luckily, there are a number of steps you can take to easily solve the problem. Whatever the cause behind it may be, simply follow the steps we outlined in this article and you’ll be ready to get on with your regular work very quickly. If you end up involving the authors of a plugin or theme in the troubleshooting process, make sure to thoroughly explain what the issue is and what steps you have already taken to speed up their work and get everything fixed faster.

Post your comment