WordPress.org

Ready to get started?Download WordPress

Forums

broken admin bar (25 posts)

  1. budestrings
    Member
    Posted 3 years ago #

    Hi.

    site: http://www.budestrings.co.uk

    when i am logged into admin the site displays normally, but when viewing the site without logging in, the admin bar appears as an unstyled list behind the page content - see screenshot http://s1138.photobucket.com/albums/n540/janimalism/?action=view&current=scrshot.jpg

    i have tried disabling plugins, i have also changed themes - this removes the problem, but when i reinstall the theme i want the problem returns.

    i have also tried hiding the admin bar by means of a plugin - this makes no difference either.

    any help please?

  2. David Gwyer
    Member
    Posted 3 years ago #

    Sounds like the problem is with the theme you are using. You might want to try and find out if it is compatible with WordPress 3.1.

  3. budestrings
    Member
    Posted 3 years ago #

    it did seem to be laright for the first week or so of editing the site and adding plugins. the problem pretty much occured overnight, so maybe there is a problem with the css import rules?

  4. budestrings
    Member
    Posted 3 years ago #

    anyone else??

  5. Kristy LaPorte
    Member
    Posted 3 years ago #

    Oh, I just solved this problem on a site I'm working on too.

    There's a "hook" that you need to have in your header.php file. Make sure you're not missing it. Add this code JUST BEFORE your </head> tag.

    <?php
    	/* Always have wp_head() just before the closing </head>
    	 * tag of your theme, or you will break many plugins, which
    	 * generally use this hook to add elements to <head> such
    	 * as styles, scripts, and meta tags.
    	 */
    	wp_head();
    ?>
  6. budestrings
    Member
    Posted 3 years ago #

    didn't work for me. the tag <?php wp_head(); ?> was already in my header.php code anyway. hmmm.

    i have been using an admin bar plugin which causes the bar to be displayed at all times - this kind of fixes the problem as long as the plugin is activated. its not ideal though because i'd rather lose the bar for non logged in users.

  7. esmi
    Forum Moderator
    Posted 3 years ago #

    Ensure that you have <?php wp_footer();?> just before the closing </body> tag in your theme's footer.php template file.

  8. budestrings
    Member
    Posted 3 years ago #

    i've inserted that tag and the problem still persists. i do however now have a prettier restyled admin bar at the top of the page when the plugin is activated - which at least looks better... :)

  9. iamjanco
    Member
    Posted 3 years ago #

    Has anyone made any more headway with this issue? The list items in my adminbar just started showing up in the broken fashion like the one described above. I can turn them off of course by installing the show/hide admin bar plugin, but that's not really optimal. The hooks in my header and footer php files are fine, and it's not being caused by a plugin. I could restore the dbase (which is where I think the problem is because of a couple of broken links that shows up in the broken adminbar), but stupid me only has an older copy of the dbase... which I'll now resolve by backing up the dbase on a regular basis. I also noticed that when logged in, the html for the adminbar is added below the javascripts are the bottom of the page, just before the last closing tags.

  10. budestrings
    Member
    Posted 3 years ago #

    I'm pretty sure the issue is down to messy code in the theme css, because the problem disappears when i change themes. which theme are you using?

  11. Kristy LaPorte
    Member
    Posted 3 years ago #

    For me, the issue was that I was missing one of the hooks, either the header or footer one. I believe both need to be put in the proper place for the admin bar to work.

    See this: http://codex.wordpress.org/Function_Reference/wp_head
    and this: http://codex.wordpress.org/Function_Reference/wp_footer

    Until I had these hooks in place in my theme, the admin bar was always a broken mess. Once I put the hooks in, it worked perfectly.

  12. Kristy LaPorte
    Member
    Posted 3 years ago #

    (Aside from the hooks, I unfortunately have no idea, unless there's some CSS somewhere that's styling it wrong? :/)

  13. iamjanco
    Member
    Posted 3 years ago #

    I actually solved the mystery last night. Turns out that the problem was actually my fault (isn't it always?)...

    When I added the typical "site design by <a href="yada yada...", I took a shortcut and added it by way of the copyright setting/field in the theme options panel. After doing so, it worked fine (including the linking) until two days ago, which threw me off. The issue finally reared its ugly head when the function(s) associated with that copyright line were put into play and/or conflicted with something else.

    Long story short: hard coding the design attributions into the footer.php file fixed the problem.

    "duh...," sayeth this happy camper

    Thanks all!

    --jfc

  14. budestrings
    Member
    Posted 3 years ago #

    I've double checked, and i have both hooks where they're supposed to be. i don't have a copyright setting field in my them options - this could be because i ripped out a bunch of encrypted code - but the copyright code in my footer looks ok. so its still the admin bar plugin for me.

    as i said, changing themes disappears the problem - i don't think i caused the problem by taking out encrypted links from the footer, because reinstalling the freshly downloaded theme makes no difference.

    unfortunately i know jack about css, so i have no hope of finding a problem there.

  15. Kristy LaPorte
    Member
    Posted 3 years ago #

    I wouldn't mind taking a look at the CSS to see if I spot anything, although I can't guarantee that I'll be able to identify the problem.

  16. Kristy LaPorte
    Member
    Posted 3 years ago #

    Bude: Well I took a look and it's a bit too complex for me to jump in and get my head around it, although I did notice a lot of z-indexing and absolute and relative positioning in the theme's main CSS. I have to wonder if that's pushing it around and breaking it.

  17. iamjanco
    Member
    Posted 3 years ago #

    Bude: without being able to log into the site and actually see the source that's being generated while logged in, it'd be fairly difficult to troubleshoot the issue.

  18. budestrings
    Member
    Posted 3 years ago #

    could someone look at the source code in chrome or firefox for me and tell me which .php file this code comes from:

    line 105 onwards:

    <ul style="display:none;"> 
    
    <li><a href="http://www.freewordpressthemes4u.com/category/globe">globe wordpress themes</a></li>
    <li><a href="http://heathrowairportguide.net/airport/parking/heathrow-business-parking">heathrow business airport parking</a></li>
        <div class="l">
    
        </div>

    reason being this is afterbirth from the encrypted code i removed, and i think it might be able to point me toward the problem.

  19. GeraldS
    Member
    Posted 3 years ago #

    After updating to 3.1.3 I'm having a similar problem with my custom theme. The admin bar is there, it's just the css that's missing, but only on the front page. On every other page the admin bar is working.

    I found several notes about wp_head(); and wp_footer(); but both are there.

    index.php (admin bar not styled)

    <?php get_header(); ?>
    [...]
    <?php get_footer(); ?>

    page.php (admin bar styled normally)

    <?php get_header(); ?>
    [...]
    <?php get_footer(); ?>

    header.php

    [...]
    <?php wp_head(); ?>
    </head>
    [...]

    footer.php

    [...]
    <?php wp_footer(); ?>
    </body>
    [...]

    Actually on the index page the whole wp_head(); output is missing.
    I don't see any reason why the behavious should be different on this page. I'm out of ideas what I could check further.

  20. robahas
    Member
    Posted 2 years ago #

    Similar issue here: Suddenly the admin menu was all spread out on the top of the page. THE PROBLEM: this theme allowed for user input in the footer. My customer had inserted <a href= in the input field, saved it and left it. Nice eh? So if you have this problem look for that sort of thing.

  21. Chetan Chitte
    Member
    Posted 2 years ago #

    Hello friends,

    I had the same problem, the Admin bar was broken and was appearing right after footer code. If you know how to code html then website page having problem in Firefox any by pressing "ctrl" + "U" go to the source file. Now all the coding you see for those broken bar just copy it and paste it in note pad. E.g.: If u have same problem like i had, the bar used to appear after footer then all the coding right after footer ends copy it except closing body and html tag. Now go to Index.php in your wp-admin pannel and disable all the coding for broken bar links... like i did..

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Hope this will be helpful..

    Thanks and regards,
    Webmechanic.in

  22. justinwashere
    Member
    Posted 2 years ago #

    I'm also having this issue. Assuming it was my theme, I switched to 2012.
    no luck.
    I deactivated all plugins.
    no luck.
    I deleted all plugins.
    no luck.
    I reinstalled wordpress from the admin panel.
    no luck.

    So, if this is not the theme, the plugins, or the platform, then what is causing this issue? I'm totally lost.

    Thanks for any help!

    Site: http://www.WorldTravelBuzz.com

  23. robahas
    Member
    Posted 2 years ago #

    Justinwashere - that only leaves your content. So I bet you have an incomplete <div></div> pair or just a spare bracket somewhere in your content.

  24. justinwashere
    Member
    Posted 2 years ago #

    Robahas - my thoughts exactly - and thanks for the response - but that wasn't it.

    A manual update of WP fixed the problem - fixed all my problems actually!

    for those interested, try this: http://codex.wordpress.org/Updating_WordPress#Manual_Update

    Cheers!

  25. budestrings
    Member
    Posted 2 years ago #

    i managed to cure my problem differently. i came across another post which mentioned looking for admin bar link code in the footer which may have been pasted there accidentally.

    my footer did contain link code, all of which i ripped out. in the process i do seem to have destroyed the front end admin bar, which i don't mind as i cannot see the point in it and i can easily access my admin area via the log out link in the footer. the site looks much cleaner without the admin bar and the unstyled lists have disappeared.

    the only issue it left me with was a floating unstyled link for switcvhing to the mobile site, which i am working on here.

Topic Closed

This topic has been closed to new replies.

About this Topic