Please could anyone help me with this problem? The wordpress admin bar is not displaying on the front-end (public visible pages) of my website. It shows when I\'m logged in at t
To clarify after a lot of searching for a solution, similar to MattKnowles solution but more specific: Make sure that in settings > WordPress Address (URL) and settings > Site address (URL) that if one has www then the other also does and the other way round. Otherwise it seems while you are browsing the site it is a different domain to the admin area and the admin bar does not show.
Just add in your template
<?php wp_footer(); ?>
before </body>
and <?php wp_head(); ?>
before </head>
I wanna leave my solution since I tried literally every possible solution on the internet. The website has LiteSpeed and is behind a reverse proxy from Deflect.ca similar to cloudflare, it blocks and caches as well.
The problem is the default cache from Deflect is set on 10 minutes and that caused the problem. Setting it with lower settings and removing all admin caching from LiteCache solved everything.
add this to the end of your footer.php
in your theme folder:
<?php wp_footer(); ?>
problem solved :-)
Here's a solution that I found.
Need to have <? wp_head()?>
and <? wp_footer(); ?>
.
More info: http://blog.frontendfactory.com/how-to-add-wordpress-toolbar-to-your-custom-theme/
Make sure site addresses are the same! I had one set at http://www.example.com and the other (WordPress) address set to http://example.com or visa versa.
I had them set this way because I though it was needed for the site to show up when you type the url without the www.
Now that both addresses are the same (with the www) my admin bar works, I stay logged in, I can comment, see preview or draft content, cross-site authenticate and logout, wow!
an entire year of wondering why WP just never worked right across over 30 websites!
Going to change addresses to the same "www" address in the rest of my 30 sites now and enjoy error-free WordPress for the first time ever...it's a great day!
Remember to remove any admin bar code you may have added in your theme's function.php file or in your styles.CSS
Thanks to all who help us here!