Warning: Invalid argument supplied for foreach()
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.