WordPress.org

Ready to get started?Download WordPress

Forums

Admin bar not loading (blog page, not admin side) (9 posts)

  1. TomGCCC
    Member
    Posted 2 years ago #

    I'm getting this error at the top of the page at http://www.thinkingchristian.net:

    Warning: Invalid argument supplied for foreach() in /www/virtual/thinkingchristian.net/wp-includes/class-wp-admin-bar.php on line 342

    This is not happening on the admin side.

    Thanks.

  2. Re-do the upgrade for 3.3 if you can.

    Also that only shows up if you're logged in, so check your plugins and see if any are causing conflicts.

  3. TomGCCC
    Member
    Posted 2 years ago #

    I've done both those steps previously. It happens with all plugins deactivated, and it happened after re-installing the upgrade. Thanks for checking in with me.

  4. TomGCCC
    Member
    Posted 2 years ago #

    I've just tried it with a different theme. It works that way. Apparently that's where the problem is.

  5. Then yeah, you have something in your theme conflicting with the toolbar in 3.3

    Go through the functions.php file for starters.

  6. TomGCCC
    Member
    Posted 2 years ago #

    Any idea what I'd be looking for there?

  7. wp_deregister_script('admin-bar');
    wp_deregister_style('admin-bar');

    If you're doing ANYTHING with the admin-bar, that'd kill it.

  8. Sergey Biryukov
    WordPress Dev
    Posted 2 years ago #

    Warning: Invalid argument supplied for foreach() in /www/virtual/thinkingchristian.net/wp-includes/class-wp-admin-bar.php on line 342

    This warning appears if a theme has two wp_footer() calls in footer.php, or both do_action('wp_footer') and wp_footer().

    There should be only one call, right before </body>.

  9. TomGCCC
    Member
    Posted 2 years ago #

    Thank you! You solved it for me. Happy New Year to you!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags