Wordpress Admin Bar Not Showing on frontend of site

前端 未结 17 1021
星月不相逢
星月不相逢 2021-02-01 14:58

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

相关标签:
17条回答
  • 2021-02-01 15:33

    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.

    0 讨论(0)
  • 2021-02-01 15:34

    Just add in your template <?php wp_footer(); ?> before </body> and <?php wp_head(); ?> before </head>

    0 讨论(0)
  • 2021-02-01 15:35

    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.

    0 讨论(0)
  • 2021-02-01 15:37

    add this to the end of your footer.php in your theme folder:

    <?php wp_footer(); ?>
    

    problem solved :-)

    0 讨论(0)
  • 2021-02-01 15:39

    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/

    0 讨论(0)
  • 2021-02-01 15:40

    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!

    0 讨论(0)
提交回复
热议问题