Wordpress Admin Bar Not Showing on frontend of site

前端 未结 17 1019
星月不相逢
星月不相逢 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:24

    Check that your theme includes a call to the function wp_footer() at some point, usually at the very bottom of footer.php. That generates the code required for the admin bar to show.

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

    For me the issue was that I was using http://mydomain.com/wp in the WordPress address but http://www.mydomain.com for the site address. We had added the www to the WordPress address so that GoogleAnalytics would work and that's when the Admin Bar broke.

    Adding www to the WordPress address fixed the issue.

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

    My #wpadminbar had a z-index: 99999;

    In an act of myopia I made a sticky header that was in conflict with the Admin bar's stickiness. I had a z-index greater than the admin, making it rest behind the visible div.

    I made my own sticky less powerful.

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

    I had a sitiation when the admin dashboard was opened in one Chrome tab, but I could not make front-end part opened in the other tab to enter the admin state and show the admin bar.

    The front-end always opened as if I had not logged in as an admin in the other tab.

    The issue was that I had the site opened in yet another Chrome window (not tab) as not-logged-in visitor.

    As soon as I closed all the tabs and all the sessions and reopened the single Chrome window with two tabs (admin / front end) the admin bar appeared in the front end.

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

    Does it 'know' that you are logged in ? when in front end ? ie: meta widget shows 'logout' instead of login. if not Did you by any chance play around with the cookie paths?

    I got myself confused because I was logged in at backend, but not front end. This was because I'd being playing with the cookie path and forgot to uncomment what I'd done.

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

    First, double checked all of the other items mentioned here (wp_footer(), etc).

    Three more things to check:

    • make sure header.php has <body <?php body_class(); ?>> not just <body>
    • try disabling plugins one by one if you're still having trouble. (For me, the Simplest Gallery 2.7 with WP 3.7.1 caused a conflict that made the admin bar disappear)
    • look for function remove_admin_bar() { return false; } in the theme's functions.php - change it to return true.
    0 讨论(0)
提交回复
热议问题