Warning: Invalid argument supplied for foreach()

December 13, 2011 by
Filed under: WordPress 

Man sometimes WordPress can be frustrating. I recently upgraded my blog to the newest version and started getting a Warning: Invalid argument supplied for foreach() on each page. The string continues with a bunch of other junk and ends by pointing to (ending with) class-wp-admin-bar.php. After much searching and a variety of fairly complex posts telling me to change user roles and edit PHPmyAdmin bla bla bla I found a very simple solution. Apparently the newest version of Word Press adds a new toolbar in your admin area at the top which is supposed to help you navigate. Kind of fancy, kind of fricking annoying.

Here’s the fix:

Go to the users tab on the left in admin area. Select “your profile”. Once there look for “Show Toolbar when viewing site” and uncheck. Save and your error should now go away.

Please post and let me know if it works for you. Also please rate this post.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)


One Response to “Warning: Invalid argument supplied for foreach()”

  1. My Site says:

    It’s actually a great and helpful piece of info. I am glad that you shared this helpful information with us. Please keep us informed like this. Thanks for sharing.

Leave a Reply

CommentLuv badge