I’ve done a goodly amount of searching on how to fix this error in my Widget plugin, but apparently because they are on the new side, this error is not very common. In fact, I only found one instance of it happening online and that was in the support forums, and no one had answered it yet, even after the poor guy had bumped it.
I am getting this error when I attempt to install and use the widgets plugin for my widgets-approved theme. I am able to install the plugin, activate it and I actually see the tab ‘sidebar widgets’ in the presentation tab of my dashboard. When I click on the ‘sidebar widgets tab’ this is what shows up underneath the tab:
Fatal error: Cannot redeclare register_sidebars() (previously declared in D:\hshome\databaselogin\sleepyblogger.com\wp-content\plugins\widgets\widgets.php:22) in D:\hshome\databaselogin\sleepyblogger.com\wp-content\plugins\widgets\widgets.php on line 22
Here’s what I have tried:
Upgrading to the most up-to-date version on WP
Deleting and reinstalling the plugin
Putting the entire plugin’s folder in the wp-content/plugins area so that it looked like wp-content/plugins/widget/a bunch of files and then I tried wp-content/plugins/a bunch of files (neither worked)
I asked the WP guru I know, Sarah Lewis, and she suggested:
1. Activating a different widget-ready theme. That will rule out or confirm a theme-specific issue.
2. Deactivating all other plugins, and if that improves anything, activating them one by one to find where the bad interaction is.
3. Downloading the whole WP directory and doing a directory-wide find for “register_sidebars”. That would tell me if there’s anything else trying to define the function.
I’ve done the first two and I don’t understand the third, so if anyone else out there has any suggestions, I’m all ears. Sarah will be available to follow up on my situation tomorrow, if I can’t figure it out before then, but I’d really like to start customizing my sidebars (and the temptation to edit the theme is almost too great). Please email me if you have any ideas. I will post the follow up when I know something.
Robyn, this comment has nothing to do with this post — I just noticed that I have been clicking on the “tag cloud” that you display at the top right hand side of your page (to the right of the guy holding the boom mike) and I finally realized that … it’s not a tag cloud after all, it’s a graphic! – Dennis (it’s probably just me…)
Ha ha, my hubby said the same thing. I was trying to get the ‘social tagging’ thing across, but maybe I should rotate the text 15 degrees or so to communicate that it is not a tag cloud but a graphic.
hello, Robyn!
Your widget-approved theme trying to declare this function [register_sidebars()], however the same function is in core widget file(s) [wp-content\plugins\widgets\widgets.php]. So, to decide this problem you have to comment function in widgets.php or find this function in your theme’s files and comment there.
I’ve been trying to do this, but I think I am doing it incorrectly. I’m having a difficult time trying to figure out where to start the /* and where to stop the */. I’ll keep working on it and hopefully soon I’ll be able to figure it out 🙂
Thanks.
I have the same issue. Though my PHP errors tell me it is a conflict between 2 wordpress files. /wp-content/plugins/widgets.php and /wp-include/widgets.php Which seems strange to me. Tried everything, can’t figure it out.
It has long been looking for this information, Thank you for your work.