Letar du efter att fixa problemet med att admin bar saknas i WordPress?
Admin bar är en flytande bar som visas på varje page på din website när du är inloggad. Det har användbara genvägar som tar dig till olika sektioner i WordPress admin area.
I den här artikeln visar vi dig hur du kan fixa problemet med att admin bar saknas i WordPress, steg för steg.
Vad är WordPress Missing Admin Bar Issue?
För de flesta WordPress-webbplatser är admin bar alltid högst upp på vyn när du är inloggad. Men när användare upplever problemet med att admin bar saknas kommer den att ersättas av en vit bar högst upp på vyn.
Detta kan vara mycket obekvämt eftersom du måste gå till din WordPress adminpanel (WP admin) när du vill redigera post och pages, svara på kommentarer, ändra inställningar för plugin och göra andra actions. Det innebär att inloggade användare inte enkelt kan göra saker från front-enden av din website.
The missing admin bar issue is usually caused by poorly coded themes, plugin conflicts, and user profiles that are not set up the right way.
Med det sagt, låt oss ta en titt på några sätt du kan fixa problemet med att admin bar saknas på din site. Använd bara snabblänkarna under för att gå direkt till den metod du vill prova:
Metod 1: Fixa saknad admin bar genom att kontrollera inställningar för användarprofil
En av de enklaste fixarna för problemet med admin bar i WordPress är att kontrollera dina inställningar för WordPress användarprofil. Det finns en inställning som låter dig stänga av admin bar för specifika användare.
Den kan ha stängts av av misstag eller inaktiverats av en annan användare på din website.
För att kontrollera detta, gå bara till Användare ” Profil i din WordPress adminpanel och leta sedan upp alternativet ”Toolbar”.
Du måste se till att boxen som säger ”Show Toolbar when viewing site” är kontrollerad.
Klicka sedan på knappen ”Update Profile” längst ner på sidan för att save your settings.
Metod 2: Fixa saknad admin bar genom att kontrollera WordPress Theme Files
En annan vanlig orsak till att admin bar saknas är när your WordPress theme saknar wp_footer-funktionen
.
Först vill du byta tillbaka till ett standardtema. Detta hjälper dig att se om ditt nuvarande theme orsakar problemet.
Gå bara till Appearance ” Themes i din WordPress dashboard, hovera över ett av alternativen för standardtema och klicka sedan på ”Activate”.
Om admin bar visas, då vet du att det finns en issue med ditt befintliga WordPress theme.
Byt nu tillbaka till ditt ursprungliga theme och skapa en komplett WordPress backup så att du kan återställa din site om något skulle gå fel.
Därefter måste du ansluta till din WordPress site med hjälp av en SFTP/FTP-klient eller appen File Manager i adminpanelen för ditt WordPress-webbhotell.
För mer detaljer kan du se vår guide för nybörjare om hur du använder FTP för att uploada filer till WordPress.
Gå sedan till din website’s theme folder, som ligger i wp-content/themes/your-theme-name
, och hitta en fil som heter footer.php
.
Efter det måste du öppna filen i din föredragna textredigerare och rulla till slutet av filen för att se om du har den här koden före den avslutande <body> -taggen
:
<?php wp_footer(); ?>
Om du inte har detta måste du add to koden och uploada den saved filen tillbaka till din server.
Kontrollera filen Functions.php för Added Line of Code
En annan anledning till error om att admin bar saknas är att den döljs av ditt temas functions.php-fil
. Detta code snippet kan ha lagts till av din theme utvecklare.
För att fixa detta måste du öppna upp din functions.php-fil
och sedan leta efter följande code snippet i filen och ta bort det.
add_filter( 'show_admin_bar', '__return_false' );
Efter det behöver du bara save filen och uploada den tillbaka till din websites theme folder.
Metod 3: Fixa saknad Admin Bar genom att kontrollera för WordPress Plugin Issues
En plugin-konflikt eller ett dåligt kodat tillägg kan också orsaka problemet med att admin bar saknas i WordPress.
Först måste du ta reda på vilket plugin som orsakar problemet. För att göra detta, navigera till Plugins ” Installerade tillägg för att nå sidan med aktiva tillägg.
Därefter måste du välja alla tillägg och sedan välja ”Deactivate” från dropdown-menyn ”Bulk Actions”.
Klicka sedan på knappen ”Tillämpa” för att deaktivera alla plugins.
Efter det kan du gå en efter en och klicka på knappen ”Activate” under varje plugin.
Om du aktiverar ett plugin och det får admin bar att försvinna, måste du deactivate det och hitta en ersättare. För fler idéer, se vår lista över de WordPress tillägg som måste finnas för företags websites.
Slutligen kan det finnas ett annat problem som gör att admin bar försvinner. Om ingen av lösningarna ovan fungerade kan du aktivera debug så att WordPress visar dig varningar och notiser som tidigare var dolda.
För att göra detta måste du öppna din wp-config.php-fil
och leta reda på kodraden som säger:
define('WP_DEBUG', false);
Sedan måste du ändra ”false” till ”true”.
Detta kommer att ge dig ledtrådar om vad som orsakar problemet så att du kan troubleshoot WordPress för att lösa problemet.
Mer detaljer finns i vår guide för nybörjare om felsökning av WordPress error.
Bonus: Få hjälp från professionella underhålls- och supporttjänster för WordPress
Om du konstant runkar på issues på din WordPress website eller är trött på att göra allmänna underhållsuppgifter, då kan det vara dags att anropa proffsen.
WordPress underhållstjänster kan ta hand om allt från regelbundna updates till backups och troubleshoot. Med WPBeginners underhållstjänster får du till exempel tillgång till support dygnet runt, övervakning av drifttid, removal av skadlig kod och mycket mer.
Ytterligare resurser för adminfältet i WordPress
Om du behöver mer hjälp med adminfältet i WordPress finns det några andra poradnikar som du kan kontrollera:
- Vad alla borde veta om adminfältet i WordPress
- Så här inaktiverar du WordPress Adminfält för alla användare utom administratörer
- Hur man Poprawkar WordPress Nav Menu Utseende Under Adminfältet
- Så här lägger du till anpassade genvägslänkar till Verktygsfältet i WordPress
Vi hoppas att den här artikeln hjälpte dig att fixa problemet med ”WordPress admin bar visas inte”. Du kanske också vill se vår guide om hur du lägger till ett centrerat notification i WordPress-admin eller vår kompletta guide till WordPress errors.
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.
Jiří Vaněk
I also encountered the missing admin panel issue in WordPress. It was caused by a caching plugin, as I later discovered, which is a fairly common occurrence. This was effectively resolved by disabling caching for logged-in users (in the admin role). So, as a tip, it’s a good practice to check the caching settings of plugins, especially to ensure there are no conflicts. Almost every caching plugin provides an option to disable caching for admin users, which prevents the admin panel from disappearing.
Ravi
Method 3 Worked ! ”Simple event planner” plugin was causing the issues, thanks a lot.
WPBeginner Support
You’re welcome, glad our guide could help
Administratör
photoMaldives
Thanks for all your excellent tuts – they have proved invaluable over the years.
And good news for us that you are often featured high up in google rankings.
For this particular issue, I had installed a security plugin that was limiting login by country – my admin bar was disappearing cos I was logged out!
WPBeginner Support
Thanks for sharing, its always good to double check if there is a simple reason behind the bar going missing. Glad to hear you were able to find what was causing it on your site
Administratör
Elliott Rodgers
Brilliant! Probably saved me hours of work. At least taught me something new.
WPBeginner Support
Glad our guide was helpful
Administratör
Sam
I had this problem. The toolbar was randomly popping in and out as a move through the pages. I hard reloaded the cache and it seems to have fixed for now.
Clint D.
My issue was caused by a plugin. I forgot that I had disabled the admin bar through the plugin, White Label CMS.
Just wasted about an hour on this. Hope this helps somebody else.
WPBeginner Support
Thanks for sharing this should someone else run into a similar issue
Administratör
Carsten Legaard
Now it is gone again, the admin bar, as it did so many times over the years. I have the footer.php right, but still the admin bar does not show.
What else could bug it?
WPBeginner Support
You may want to check in your user settings to see if it is disabled there.
Administratör
Sarah Delta T
Work !!! Thanks
WPBeginner Support
Glad our guide was helpful
Administratör
Eszter
I had the same problem, tried a lot of suggestions, but the solution was a row in functions.php: show_admin_bar (false); . The ’true’ value solved the problem!
WPBeginner Support
Glad you were able to find the issue and thanks for sharing your solution
Administratör
Dora
Thank you, Eszter! This solved the issue for me.
andy
this man deserves a medal
Malo
Thank you !! it worked on the first try.
WPBeginner Support
Glad our recommendation was helpful
Administratör
Joshua
I had to re activate the default theme then switch it back and it solved my issue.
WPBeginner Support
Thanks for sharing what solved the issue for you
Administratör
Michael G. Brattland
I recently over the last two weeks had my Wordpress Admin Bar go missing on all but about a half dozen pages of my 560 Wordpress Elegant Thems DIVI and DIVI Builder site. I tried all the fixes posted here and discovered that my change of the web page URL in setting to take advantage of my ISP provided security certificate, making the address a https versus http caused this issue. I changed it back to a http URL and it resolved it allowing the Wordpress Admin Bar to come back on all 560 pages. My ISP is using PHP 5.4 and I have the most current Wordpress 5.1. thought I would share. This has been a big challenge to resolve. Hoping my ISP can advise why this could be.
WPBeginner Support
You may want to also check with your hosting provider to ensure the SSL certificate was added correctly.
Administratör
Fatima
Thanks! it Worked!
Tim Helmer
You may want to disable CDN and W3 Total while doing edits.
That allows me to see the edit bar and also see changes I make real time.
Cloudflare turns itself back on after 3hrs so no need to worry. W3 Total needs to be turned back on tho… Preview mode: under General settings
Okereke Divine
The best solution that worked for me is creating a new user and if the issue repeats, then clear cache.
Cory
Thank you so much for the quick answer.
Kaleel
Perfect Solution
Harry W
I have tried all of these. Nothing. Admin bar still not showing. I login and I go straight back to logged out.
Can only get to dashboard through direct link.
Any suggestions? Bluehost ”service” is non-existent.
Federico Mastrianni
Check the ’Admin Bar Menu’ setting in Yoast SEO>General>Features. It must be set to ”OFF”.
Deepak
Thanks alot. You saved my day (y)
Ayoola Adesoye
Fixed. Thanks guys.. You guys are the reason why wordpress still exists till date. You just saved my income. My question please. I use Jetpack stat to view ,my web stat, and also use Google analytic, but they both do not bring the same stat. Jetpack can will for example show 200, while Google will show 300. And the funny part is that, on my host gator cpanel, i can view my site stat, and it also does not show the same stat. Please help, I am confused.,
Ionut
For those who use WP Fastest Cache put in exclude/exclude css, following css:
admin-bar.min.css, dashicons.min.css
At least for me this was the solution – i hope it will help
SiGa
@IONUT – thanks for saving my day by leaving this hint here. Adminbar was not showing up only on Edge, adding those rules in WPFC solved it. Never would have thought of this!
Todd
That worked for me too. Thank you.
Pharid Ali
It’s Working..
Thank you..
Omar
how you make it i tried several times and i can’t solve it, could you plz help me
Chris
Hey and thanks for the post. I have the same ”blocked” message on my website
I have added the part as described and it shows up when I look at the files, however it does not show up in the actual liive website. Looking at the source code there, I can just see inserted code from the plugins.
I also checked with my provider one.com as well and they cant replicate the issue, it works for them using my account. So i reformatted my pc to make sure its not a browser issue, still the problem is happening. Also tried the default theme and diasbling all plugins as well as adding code to the htaccess file..
Any idea why this is happening?
Thanks
Chris
Arech Lim
Just add another user account it was the easiest way to solve the problem.
Eddie P
That was so easy. Thank you
sadatia
my site is
Suddenly i have found that my admin bar (logged in user) info open to all viewers.
Its horrible. Need a solutions.
Arinze Prince
Please help me out
When I try to login via the front-end of the site, I enter my credentials, and hit log in. The page refreshes, and I’m not logged in. The admin bar does not appear, and I cannot access member-only parts of the site.
When I log in via wp-admin, I can log in just fine. I go to the back-end admin dashboard. However, when I, while logged into wp-admin, browse to the main site (kmtc.be) it still shows I’m not logged in. The admin bar does not appear, I cannot access member-only parts of the site – despite being logged in. I’m thinking there’s some sort of breach between the back and front end of the site.
When I deactivate all plugins, the problem persists. When I change the theme AND deactivate the plugins, still, I can’t login. I’ve done an overwrite of all wordpress and theme files – I still cannot login via the front-end.
Help will be very much appreciated!
Fernando Santos
If nothing mentioned in the post works, try changing the Wordpress Address (URL) and the Site Address (URL) at Settings > General by adding or removing the www to them.
If it works, you can switch it back then.
Worked for me!
Raphael
thanks man! this solved my isue.
It seems that some url rewrite in the database was not completed and after doing what you instructed it gets updated and all gets back. simple as that.
Valeu meu caro! abs!
Paul
This did it for me. Nothing else in this thread helped, but this did it.
Thank you for this. Duly noted this fix!
JohnSmith
This worked for me as well, although I changed the http to https.
Michael Warren
In my case it was a CSS conflict hiding the text of the wpadmin bar. But not CSS from the theme or plugin stylesheets. It was a Chrome extension called Stylebot adding conflicting CSS that hid some of the items.
Mesh
Perfect solution…just what i was looking for..thanks very much for this post
Silver Knight (Greg)
I noticed there was some script code below the wp_footer() call. I moved that line of code to below the script and my admin bar came back.
Thanks for the info.
Greg
Behdad Lotf
none of these solutions worked for me! something weird happened to my site when I log in I cant view admin bar and also visual composer grid posts dont load they show nothing I have to admit that in my previous server i didnt have this problem can the problem be caused becauase of something related to server I recently moved to?
korkiat
Thank You.
Wayan Adika
thanks a lot, I try to build WordPress theme from scratch, and find if admin bar is missing, then I search through Internet for the solution and found your site and fix the problem by put the code to the footer. Once again thank you very much
Terry
Thanks for posting this! However, after trying these suggestions, discovered that my problem was Sucuri security plugin hardening settings, which did not go away even when the plugin was turned off, so it masked the plugin being the problem when I tried that troubleshooting step that you listed. I had to reactivate the plugin and ”unharden” the settings to fix the problem. (Not sure which specific hardened item did the trick, as I just reverted all to the original state.) It also fixed the problem we were having with the visual editor not working as well, by the way. Overzealous security setting! Just sharing this in case someone else is pulling out their hair like I was and wishing a search had brought up this particular issue that was not easily uncovered.
santanu chowdhury
Thanks for this tutorial…
John O'Brien
What do we do if the line IS there? I checked my file and everything is AOK. The wierd thing about my development site I am playing with is that if I go to the HOME page, the admin bar goes away. If I navigate to any of the other pages, the admin bar comes back. What is causing this?
Andre
I just changed to the parent theme again and it worked. Worth to try changing themes.
pete
in my case it was because of a caching plugin (fastest cache). I m not 100% sure why but it was about caching issues.
Hajrullah
Thank you for your simply solution you da best
Rajat
Thank you for the blog… This saved a lot of headache for me and helped me to solve my missing admin bar problem.
Cara
HELP! I can’t figure out what in the world is wrong with this theme… I’m mostly just changing the CSS, as it’s a theme that I’ve built and used on other WordPress sites before without problems. The and are in the right places. I checked to see if this problem existed with the other pre-installed themes and it is! So I thought maybe plugins… I deactivated, then deleted all my plugins. Nothing. I’m out of luck and don’t have a clue what to do now. Any ideas? Thanks!
Lee
After many hours of losing my mind I fixed it : ) stupid wp_footer() xD
Christine
Genius. Just making sure the box was checked worked for me! It was strange because it has been working perfectly and it suddenly stopped, but really happy you showed me where to look first!
emeka
worked like a charm…you are the best!
Jan vD
Had the same problem, tried a lot of suggestions, but them I found out there war a white line in the header. Removing the white line did the job.
Chukwuma
Hello, thanks a lot for making this post, but unfortunately in my own case the admin bar shows for only users with admin roles. Users with roles such as shop manager do not see the admin bar at the front end, but they see the admin bar at the back end. Is there a possible solution for this fix?
RaMGoN GaLLaGHeR
Hello,thanks, I resolve this problem in Dashboard> user perfil > Admin Bar > see admin bar
shams
Thanks @RAMGON GALLAGHER
Lenyman
Worked for me! Thanks.
Redrambles
Also helpful would be to mention that you can deactivate your plugins by renaming the folders in your plugins folder, via FTP. (I usually put an underscore at the beginning of the name, such as ’_akismet’).
The ’disappearing admin bar’ happened to me recently and I was unable to log into the dashboard with the ’wp-admin’ suffix in the url. I deactivated the site’s plugins via FTP and was able to get back in the dashboard to do the rest.