Home »

FIX: WordPress Notice: register_sidebar was called incorrectly

Make it go away.

I was having WordPress problems, so I turned on debugging. To enable debugging, you can add the following line to wp-config.php in your root directory.
define( 'WP_DEBUG', true );

With debugging on I was getting this error on my home page:
Notice: register_sidebar was called incorrectly. No id was set in the arguments array for the "Sidebar" sidebar. Defaulting to "sidebar-1". Manually set the id to "sidebar-1" to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in /home/mydomainname/wp-includes/functions.php on line 5313

To fix the problem open the functions.php file in your currently active theme. Look under ./wp-content/themes/YourThemeNameGoesHere/ for the functions.php file.

In this block of code:

screenshot of functions.php code before

Your specific theme may look different, but the idea will be the same. Add an ‘id’ line of code after the ‘name’ line like this:

screenshot of functions.php code after

If you have additional calls to the register_sidebar function, then you’ll have to location those code blocks and add the ‘id’ line to each remembering to increment the id names or give them unique names.

When you’re done, shut off debugging in wp-config.php with the following.

define( 'WP_DEBUG', false );

Hope that helps you!

No Comments >
Home »

FIX: wp-admin white screen of death (WSOD)

If you’ve tried everything else without success, try this.

December 19th, 2020 | Technology | , , , , | Comments: 0

Got a blank screen after you login into your WordPress admin panel? If you have tried all the other things suggested on various sites (disabling themes, disabling plugins, increasing memory limit, removing bits from wp-config.php, repairing databases, contacting your host, and enabling debug mode) and you still can’t get it working, try this.

PLEASE NOTE: I offer absolutely no promises it will work for you and no support if it doesn’t.

Aim your big bad browser at:

Your WP installation might give you a button to press to update your database. If so, click it. Et voilà! You’re back in business.

Again, I offer no support for WordPress installations. I got out of the website design business a long time ago and only do this WP stuff for my own interests now.

No Comments >