1

I want to update a customers blog to a child theme that is based on a newer version of the actual deployed theme. My problem is, the developers of the theme changed the IDs of sidebars. In the old version register_sidebar() was called without providing an ID, therefor WP used numeric IDs. Now developers named the IDs alphanumerical (home-1, home-2, etc).

I couldn't find out how to copy the widget settings in the database from one sidebar to another. Therefor I registered the new sidebar IDs in the old theme and the old sidebars in the new theme. Than I used the Duplicate Widget Plugin to replicate the widgets in the new sidebars. When I preview the new theme, everything looks good, but upon activation my widgets are gone. Looking into the widget backend and my sidebars are mostly empty, except one or two. Reactivating the old theme and everything's fine.

I also tried to export and import widget settings, but one plugin didn't install correctly and the other one exported a mostly empty widget_settings.xml file shown below.

<?xml version="1.0" encoding="ISO-8859-1"?><widget_settings></widget_settings>

1

1 Answer 1

0

WordPress actually lists all WidgetAreas that aren't registered. You then are able to drag and drop the widget settings into the new area.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.