Wordpress Admin Bar Not Showing on frontend of site

前端 未结 17 1020
星月不相逢
星月不相逢 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:44
    wp_footer() , 
    

    add this function to footer.php

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

    Beware of unclosed HTML tags above <?php wp_footer(); ?>. Unclosed tags in the source will have closing tags generated by the browser and can suck in the WordPress admin bar HTML.

    ...
        <div class="hidden-by-css">
          <span> You can't see this</span>
    
        <?php wp_footer(); ?>
      </body>
    </html>
    

    That will cause the HTML generated for the admin bar to get sucked into the .hidden-by-css DIV and your admin bar won't show up.

    So make sure you close all your tags. :)

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

    I know this is an old question, but another option - If you purchased (use) a pre-made theme make sure that theme does not remove the toolbar in its code.

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

    Most of the time the wp_footer() call is right where it should be so if you still can't see the admin bar then try the following:

    1. log out of the backend

    2. navigate to the front-end

    3. clear your browser cache

    4. log back in using the absolute url i.e. yourwebsite.co.uk/wp-admin

      and then see if it comes up - worked for me.

    Also make sure the "Show Toolbar when viewing site" box is checked in your user profile page or whatever you try ain't gonna work my friend!.

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

    Still working on this, but there is a conflict with Woocommerce. if deactivated, toolbar is there. Active, no toolbar. More info here.

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