58 responses to “Widgets Reset: WordPress Plugin”

  1. david (b)

    I recently encountered this problem, but remembered where it was hiding.

    I think I plugin’s an awkward solution to this problem; the core of WordPress should feature this functionality in some way. Either with a prompt before you change themes (if you were using widgets and it had more than the standard) or with a way to reset them. Perhaps a combination of the two is the best solution.

    I’m also thinking that perhaps widget makers should always allow more than one widget to exist. I can’t think of a good reason that you wouldn’t want to allow multiple instances of it. (Having said that, I’m not 100% sure how to do it. I need to look into that.)

  2. david (b)

    Justin (No comment threading, huh? (Though I don’t think I have it running on any public site either…)) — Your point that it’s something of a feature is sound, but it’s a problematic one. The issue is that there are two basic usage cases: those who want a sidebar with the same stuff regardless of the theme they decide to use today and those who want to use a sidebar to customize the workings of a specific theme.

    The solution that works well for the first case–to always keep all widgets intact when switching themes–fails in the second. The better solution for the second case is to have WordPress remember what widgets are where on a per theme basis, but release them when an individual case is not being used.

    The more I think about it, though, the more I think the current solution could be the best. It’s very likely that the first case I mention is more common than the second. And that few themes have more than one widgetable area. And that average users rarely change their theme or widgets after they’ve found a configuration they like.

  3. Nathan Rice

    Figuring this one out saved my butt on a client project.
    http://comox.textdrive.com/pipermail/wp-hackers/2008-December/023354.html

  4. Andrew

    I think if I were building the widget system I probably would have automatically unregistered any widgets that were attached to sidebars that didn’t exist.

    There are other options, for example, registering any sidebars that the theme didn’t register but had widgets applied to them so the widgets could be removed; that would be fairly simple to do as a plugin, or even better having my preferred option but with a way to save widget settings as an xml file so the settings could be reloaded, or even for a default set to be available as part of a theme,

  5. WordPress Plugin Releases for 03/04 | Weblog Tools Collection

    [...] Widgets Reset [...]

  6. Ptah Dunbar

    I used to always wonder where my widgets went after switching themes. After peeking around the options db, I saw the “sidebars_widgets” field. So I pretty much did what NR posted the manual way :)

    I also tweeted about presetting widgets once a theme is activated. Plan on hacking on that pretty soon.

  7. Droppin’ knowledge on WordPress: How to preset widgets to widget areas

    [...] asked myself this seemingly impossible question on twitter a while ago. It was raised again by Justin so I thought I might take a stab at it. A few hours later, here’s what I came up [...]

  8. baron

    hi. Thanks for plugin

    perfect.

    Regards

  9. dinu

    I had lost lot of widgets while changing themes … now this plugin saved me :D thanks a lot ..

  10. keep informed

    Ma frend… Great Job… is there any compilations of the plugins you made?

  11. Annie Anderson

    Justin,

    Great plugin! It saved my life. I lost half my widgets when I updated my theme a couple days ago and it was driving me nuts!

    Your plugin is awesome! It did the trick. I think it’s one of the most fabulous plugins I’ve ever used.

    Thanks a lot.

    ~ Annie

  12. Justin’s plugin saved my blog « Annie Anderson | Blog

    [...] Tadlock (who is an awesome WordPress theme developer, by the way!). His rockin’ plugin – Widget Reset – worked like a charm and I now have all my widgets [...]

  13. Chris Hajer

    Holy cow Justin, your timing couldn’t have been better. I learned of this problem when you first wrote about it a couple weeks ago. I didn’t have a need for the plugin but I did tuck the information away in the back of my brain. Then, today, all of the sudden half my widgets stopped working, on five sites, after migrating to a new domain and new server. I knew immediately what the problem was and used your plugin to set things straight.

    Thanks very much for bringing attention to this problem and providing the simple fix.

    Cheers

  14. Weblog Tools Collection: WordPress Plugin Releases for 03/04 | Aslifm Blogu

    [...] Widgets Reset [...]

  15. Naqqash M Khan

    Hey buddy! I want to say my lodz of thanksssss
    This widgets shit made me so much tensed:(
    and u blog came like an angel.
    thanks alot

    Allah Bless YOU

  16. Resetting your WordPress widgets at Mostly Harmless

    [...] playing with the code and screwed up) and can’t add or remove them, try following the advice here. The manual reset saved me a ton of [...]

  17. James

    Another incredibly satisfied user. I will tweet when I get the chance to properly sing its praises…

    James

  18. Katie Brooks

    I’m a little confused about why you would need a plugin for this. There is a REALLY simple fix that works for this problem:

    This specifically deals with the problems of disappearing widgets after theme changes.

  19. Plugin Review: Widgets Reset - RiteTurnOnly.com

    [...] Reset from the official WordPress Plugin Directory. More information available from the official release page at Justin’s blog. Split Categories Into Two [...]

  20. WPWeekly Episode 50 - Interview With Cathy Perkins

    [...] – Widget Reset – This plugin created by Justin Tadlock will completely wipe the slate clean with regards to [...]

  21. Gavan Watson

    Thanks for the plugin; it solved my case of disappearing widgets after moving one host to another.

  22. grateful

    Thanks, Justin! This post and solutions are a lifesaver.

  23. Jason

    Used your theme, but came up with error. Now I have a space with all sorts of nonsense text showing up at the top of my blog: systemsofsupport.org/udlblog. Please advise.

  24. Jason

    Sorry, that should have read that I used your plugin (widget reset)…

  25. Jason

    I apologize for all of the posts. Just in case someone else has this problem. I ended up having to delete entire directory from blog. Luckily my host makes a daily backup so I was able to restore site from it.

  26. Wordpress Blogging: Invisible Widgets | Facts You Should Know For MLM Success

    [...] The plugin is called widgets-reset. [...]

  27. Sarah Flashing

    This widget is great, it installs easy to reset my widgets, however it didn’t fix the widgets that “disappeared” as they were moved around in the wp admin section yet continue to appear on the site. I’ve tried to remove them through phpmyadmin to no avail. Any suggestions?

  28. Peter

    Thanks for this – found this post on google. I did it the manual way and it took just a few secs and I was back in business. I heard of another plugin called widget slayer (?) but after the fact.

    Cheers.

  29. Jordanna

    Hi
    I have a similar problem with widgets when I switched to a new theme, then switched back, so thought I’d try the above line of code. I’m using WP 2.7.1, Magazine Basic 2.4.2, 1024wide, 2 sidebars. The problem is the selected widgets (search, tags, categoires, calander and archieves) on the right-hand sidebar are also duplicated (ghosted) on the left-sidebar too. The left-sidebar has recent comments and text widgets selected. The duplication of the right-sidebar widgets positions itself below the left sidebar. So I thought I’d use the code above just to clear them all out. These ghost widgets displayed on the main blog page (not on a post page).

    In Dashboard-Appearance-Widgets the ghost widges are listed as unavailable but are not in the list on the right of selected widgets, so therefore they can not be removed. The effect of using the above line cleared only the left-sidebar widgets that had been selected. The previously selected right-sidebar and its ghost duplicate positioned on the lower left were not cleared, but remained. I placed the line of code at the very top of functions.php. Any advice on solutions I might try to resolve this problem would be appreciated. I’m a newbie and this is driving me mad, well a little bit! Thanks.

  30. Rich

    Thanks for the tip Justin! – Have been testing custom widgets in templates and quickly managed to assign widgets to sidebars we had removed. Adding the line into function.php works like a charm.

  31. Will

    You just saved me from an hour of code hunting. Thanks!

  32. Scott

    Thanks, I’d spent far to long trying to sort this out, your one line of code fixed it for me. Many thanks

  33. WordPress Widget Problems?

    [...] Widgets Reset can fix your issue for you. Share and Enjoy: [...]

  34. Bill Courtney

    My widgets did just all disappear in 2.8 and I am using the same theme as before. The reset widget does not seem compatible with 2.8.

    I restored my settings and deactivated my widget cache and hope it does not happen again, as it happened last time when i cleared the widget cache.

    Bill

  35. Ron

    This plugin is super helpful. NOTE: The WordPress Plugin … area … place where you get them says, “Compatible up to: 2.7.1″ and gives a warning. That will put some folk off using it. In truth, it worked great on my 2.8.

    Perhaps you can get WordPress to update their message Justin.

    It sure is a life-saver as WP 2.8 stored a bunch of Widgets I had experimented with but didn’t realize were saved somewhere. Those experiments caused actual widgets not to work until I downloaded this.

  36. How to upgrade to WordPress 2.8 Baker | H5N1 Avian bird flu forecast blog

    [...] and pasted all my active Widgets into a text file, then activated Justin Tadlocks great “Widget Reset” plugin. After that, my widgets worked properly and the site runs faster. [NOTE: Widget Reset [...]

  37. harren maben

    justin i have desperate need of this idea and got if from here , i want to thank for make this as a plugin and very handy for everyone.

  38. 3 Cara Mengembalikan Widget Yang Hilang - Widget Tanpa Add — Blog SEO

    [...] Masukan di file function.php anda, letaknya Appearance – > Editor -> Function.php lalu Update File. Setelah itu hapus kode tersebut dan lakukan update file lagi (sumber: Justin Tadlock). [...]

  39. Found Not Lost » Blog Archive » The Case of the Disappearing Widgets

    [...] found this solution on how to recover your widgets when they decide to magically disappear, but it required a plug in that you have to download and [...]

  40. Tutorial To Fix Bring Back Widgets That Disappear After Changing Theme | SEO Blog & Technology

    [...] 2. You can do it manually, actually you can fix this problem without using the above plugin, but it will take a little bit effort, because you need to add an additional code inside your theme’s function.php file to get back your disappeared widgets, here’s the code invented by Justin Tadlock: [...]

  41. Terry van Diver

    I attempted to upload your Widgets Reset php file and here is what i got!

    YIKES! What can I do now? Thanks, Justin.

    Terry V

  42. flora

    I upgraded to wordpress 2.84 with Magazine Basic theme and the Tags widget has disappeared from the list of available widgets and inactive widgets. I’ve used your widgets reset, it removes the widgets from Sidebar 1 and Sidebar 2 on the widgets page, but 4 of the widgets show on the site sidebar, including the tags list. On another website when I upgraded, I used your widgets reset plugin and it solved my problem. Does your widgets reset work with wordpress version 2.84? Is there something else I can try to resolve this?

  43. flora

    Having no luck with the plugin getting my tag_cloud widget back, I found a forum topic at wordpress.org helpful in resolving this. Here’s what I did. Perhaps you can make the widget accomplish this so that others do not have this problem.
    I went into the database and restored the widget_tag_cloud row from a database backup.Changed option_value
    from a:2:{s:5:”title”;s:6:”Topics”;s:12:”_multiwidget”;i:1;}
    to a:3:{i:2;a:0:{}i:3;a:1:{s:5:”title”;s:6:”Topics”;}s:12:”_multiwidget”;i:1;}
    The tag cloud widget reappeared in the widgets screen and I was able to add it back to the sidebar. Resolved for now.

  44. Kevin Newman

    Follow flora’s clue, I checked the value of the widget options in a fresh Wordpress install, and found they were all the same:

    a:2:{i:2;a:0:{}s:12:”_multiwidget”;i:1;}

    I updated all mine to match, and the missing Widgets came back.

    +1 to add a SQL update to Widget Reset plugin. ;-)

  45. lalacan

    Great plugin, will use this for my new blog.
    Thank you

  46. John Fowler

    Hi Justin
    Just installed your Reset plugin and it looks and works beautifully. It was just what I needed to implement contextual sidebars. Thanks for your work.

    Odd problem though: I uploaded via ftp instead of WP Admin, and the plugin activated itself without showing up at all in the Plugins Panel. I deleted it from my server via ftp, expecting it to disappear so that I could upload via WP and hopefully have it appear properly in the Plugins Panel.

    But…it is still installed after being deleted from my server. I love the plugin, but have no control over it status now.

    Any suggestions?

    Cheers

  47. John Fowler

    Ignore last post…for starters I meant Widgets Reloaded, not Reset. And I solved the problem myself anyway.

    Thanks again for the great plugin!

  48. Chris Masse

    Hi folks,

    Thanks for this plugin.

    Should I use it with WP 2.8.6 (and with WP 2.9)?

    Thanks,

    chris

  49. Ryan

    I get an error on my sidebar when I run the Widget reset:

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/content/o/a/r/oaramblinknigh/html/wp-includes/widgets.php on line 852

    Instead of clearing out the widgets, the error appears and the widgets remain.

    Any ideas?

  50. Moridin

    My Tag Cloud widget along with a few others has disappeared some time ago and I can’t seem to get them back (hardcoded the tag cloud at the moment).

    Widget Reset is not helping at all – doesn’t seem to be doing anything.

    I’m at the latest 2.8.

    Any ideas? Help please! :-)

  51. James

    Thanks for the great plugin! I think it’s really cool you explain that the plugin isn’t needed and provide the code to do it manually. Good deal!

  52. Genduk

    Thanks for this plugin, it’s great.

Leave a Reply

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/Web site in attribution.

Please use your real name or a pseudonym (e.g., pen name, alias, nom de plume) when commenting. If you add your site name, company name, or something completely random, I'll likely change it to whatever I want.