on my homepage themadbeanjakarta.com the widgets (e.g. Recent Posts) are not displayed anymore and I receive an error message, when I use the customize theme menu:
Warning: Invalid argument supplied for foreach() in /home…/../custom-header.php on line 1248
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/…/custom-header.php on line 1268
I deactivated all plugins (jetpack, superwpcache) still the error displays and the content of widgets is not shown on the front page.
Any idea what happened?
I’m not seeing a site at that URL, is it down?
If you switch to a default theme temporarily like Twenty Fourteen, does the problem persist? If so, this isn’t a theme issue and you’ll need to debug your WordPress install further. Let me know.
no, the site is not down. Please try again: themadbeanjakarta.com
Will do as you say and come back.
I switched to twelve-thirteen and everything is displaying on the homepage as intended (Upcoming Events, Recent Posts, Subscribe, Search, and the social buttons).
These widgets are not displayed on the homepage with writr. Only if one of the pages is clicked, the widgets will display. Also the error message will pop up, when customizing the theme.
Would you like to have a look ‘inside’?
Hi Thomas, I can see the site now.
Have you made any modifications at all to the theme files?
Could you try downloading and installing a fresh copy from here?
For the safest results, first remove all the old theme files from your server manually, via FTP.
Then install the theme manually via FTP.
Let me know how it goes.
I did like you advised and installed a fresh theme copy via ftp, but to no avail. All plugins have been deactivated and the theme files have not been edited. Still, on the frontpage no widgets are displayed.
Can’t find out what happens.
Hope you have some ideas what to do now.
Hi Thomas, I can’t think why that would be happening. I just activated Writr 1.0.8 on my test site with WordPress 3.9 and widgets are displaying correctly on the front page.
All plugins have been deactivated
I’m seeing many plugins active on your site currently – did you reactivate them all already?
yes I reactivated the plugins again, since it didn’t change anything to deactivate them.
I deactivate them now (just Akismet is running) so you might have a look yourself.
Thanks, I see it. I’m a bit mystified by this one.
Would you mind taking a screenshot of your widgets page just in case it provides some clues?
Here’s a guide on how to make a screenshot, if you’re not sure: http://en.support.wordpress.com/make-a-screenshot/
By “your widgets page” I mean your dashboard area, under Appearance > Widgets.
Thanks. The only other thing I can think of is that your copy of the WordPress core files are corrupt somehow, or that the install didn’t complete properly. That might explain the Customizer error as well. You might want to try a manual reinstall of the core WordPress files, while being sure to follow proper backup procedures – and please be extremely careful not to overwrite your wp-content folder, .htaccess, or any other files you’ve modified.
Hello! I’m currently having the same problem. It’s a clean installation from the spanish version of wordpress (just downloaded from https://es.wordpress.org).
The invalid argument supplied for the foreach() in line 1248 is that $this -> default_headers = NULL, while it expected an array. Why is that, well, I’m not that proficient with wordpress 😉
As far as I can see, writr is returning the correct string (a gravatar URL containing an image). Maybe wordpress expect writr to define also the $this->default_headers?
My last trace takes me to the custom-header function in writr, the one that changes the header in personalize theme. Removing the file contents makes the errors disappear.
The version I have is the latest, and yes, I downloaded a clean version to check out 😉
stormbolter, just to make sure, do you have any plugins installed which could be causing the trouble? Also, if you switch to the default Twenty Fourteen theme, does the problem go away? These are good first, basic troubleshooting steps to check, and if those steps don’t surface anything useful, let me know and I’ll try digging in and testing for you. One thought: could the es files have something wrong with them by chance?
I have only Jetpack installed (although later I installed other plugins, the problem, as far as I know, was already present with Jetpack); switching to Twenty Fourteen resolve my problem. Disabling Jetpack (or any other plugin) does nothing to remove the error.
In fact, at first I suspected that maybe WP Editor (a plugin that overhauls the theme editor to be more useful) was the culprit so I tried a clean instalation without WP Editor. The other plugin installed is Text Hover (a simple plugin that does text replacement on the posts to add ABBR tags).
In my case I don’t have problems with sidebar widgets, only I’m annoyed by the php error in the “customize theme” section.
As I told before, removing the custom-header.php in writr theme solves the problem without breaking anything, but I assume it does something nice that probably I should like to see!
- The topic ‘Homepage doesn't show widgets, error in custom header’ is closed to new replies.