I’ve tried everything I have found but nothing helps me.
I’ve put
<?php wp_head(); ?>
in header.php
and
<?php wp_footer(); ?>
I even tried:
- Disable all plugins
- Default WP theme
- and etc.
I’ve tried everything I have found but nothing helps me.
I’ve put
<?php wp_head(); ?>
in header.php
and
<?php wp_footer(); ?>
I even tried:
You must be logged in to post a comment.
Some custom wordpress theme doesn’t show the admin bar into the theme page same with the wp_head() and the wp_footer() wrote on the templates files.
To resolve that problem just add the following code into your function.php or into your own plugin:
Hope that help…
If you had the bar showing previously, you might try this super-easy fix (worked for me):
Now have another look at the frontend. I did this and it fixed whatever the issue was without messing with any of the files.
I have managed to make it appear again by adding
in “header.php” after
</header>
tag.One important thing is to clear cache (check if you have cache plugin for WordPress installed like WP Super Cache or LiteSpeed Cache..) and then CTRL + F5 to refresh page.
Try disable your plug-in cache or disable for logged-in users. I had similar problem using WP Fastest Cache. Just disabled chache for logged-in users and it’s working.
If nothing helped you, try to delete all cookies. It works.
Solution is to put
show_admin_bar(true);
on top of your functions.php file.EDIT fix:
Put like this to show only when user is logged in:
I had this problem on our production site, but it was not occurring on local or staging sites. Turns out that the WordPress Address was incorrectly set with www whereas the site was always accessed without the www.
The fix:
settings
>General
WordPress Address
andSite Address
both match your site URL exactlyPosting in case anyone else has same problem.
Shortly: Most probably you have not logged in!
Long answer:
This problem happens to the new WordPress learners who try to create a custom theme. They put the
wp_footer()
andwp_head()
functions and refresh and still do not see the admin bar. And it is because they have forgot to log in to/wp-admin/
In my case it was missing php extensions curl and intl
but above all php-curl
I am using WP Super Cache, and what worked for me was disabling this option in
WP Super Cache Settings / Advanced / Cache Restrictions:
Make known users anonymous so theyâre served supercached static files.
Just go to the wp-config.php file in your root directory, set
to
and go to the webpage where admin bar is not loading. There has to be some error in you php code.
The problem is that admin bar loads in wp_footer hook or something, and if you have an error in you php code the page just stops loading and that’s why admin bar is not showing AND THAT’S WHY ADDING WP_FOOTER() TO “header.php” WORKS FINE.
Better check errors, because you probably will get another funny things on your website later.
Good luck!