I'm developing a custom theme and I added some widgetized sidebars like so:
register_sidebars(2, array('name'=>'Foobar %d'));
I then recreated them so that I could give them semantic names. Like so:
register_sidebar(register_sidebar(
array(
'name' => 'Sidebar'
)
));
register_sidebar(register_sidebar(
array(
'name' => 'Sub Menu'
)
));
But now in my admin area I see 4 sidebars. How do I delete the two older sidebars? I can unregister them using unregister_sidebar
but I don't want to keep those 2 lines of code in my theme forever.
I found this in the DB under wp_options
under sidebars_widgets
. It looks like they are indeed saved in the DB. Do you have any idea which bits to delete?
a:6:{s:19:"wp_inactive_widgets";a:0:{}s:9:"sidebar-1";a:3:{i:0;s:14:"recent-posts-2";i:1;s:10:"archives-2";i:2;s:12:"categories-2";}s:9:"sidebar-2";a:0:{}s:9:"sidebar-3";a:1:{i:0;s:21:"subpages-in-context-2";}s:9:"sidebar-4";a:0:{}s:13:"array_version";i:3;}
Thanks,
register_sidebar()
inside ofregister_sidebar()
call there?..unserialize( $string );
for arrays stored as serialized strings in the DB.