• I need a way to empty the Inactive Widgets area without dragging each one to its death one at a time. I have far too many WP sites for the manual way to be practical or even possible.

    The fact is, WP’s widgets implementation is fragile, to put it kindly. WP will merrily destroy your entire widget configuration at the drop of a hat, sometimes for no apparent reason. If you are lucky, some of the wreckage will land in the inactive area, often much is just plain lost.

    The result is that the inactive area quickly fills with junk, and ironically, once a widget gets there, it becomes IMMORTAL. I’ve tried everything I can think of to get rid of them, and they just re-spawn like a video game.

    I’ve been wracking my brain over the widget handling code to try to adapt it to automation, but with all the AJAX interactions and general obtuseness, I am stymied. I have tried deleting every persistent structure in the database and emptying every related variable, and it does no good. While you can easily destroy a normal sidebar, the Inactive area is bulletproof.

    Does anyone know a way to just blow away all the inactive widgets with a click? Can some genius come up with a plugin with a button to do this? You’d think that ability would be in there already.

    TIA

Viewing 3 replies - 1 through 3 (of 3 total)
  • All the widget data is stored in an option, including that of inactive widgets..

    sidebars_widgets is the name of the relevant option..

    Fetch the option, empty the inactive widgets array from the option then update it.. (should do it, in theory)..

    Thread Starter pcg

    (@pcg)

    yes, in theory

    in practice, has no effect

    Thread Starter pcg

    (@pcg)

    made a little progress

    apparently, the method described above does work

    however, it has been failing for me for 2 days because of a certain plugin which somehow interferes with the process

    of course

    plugins will be the death of wordpress

    if you’re smart, you use as few as possible, 98% of them are defective

    unfortunately, I’m stuck with this one, so I will have to find a work-around

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Need a way to PROGRAMMATICALLY empty Inactive Widgets area’ is closed to new replies.