How to add a text widget during theme activation
You’re almost there, except each widget’s settings are stored separately from the sidebars_widgets option, which just stores widget “instances”. Try out the following function – you’ll still need to use register_sidebar, but it eases the pain for then pre-registering widgets on those sidebars. What it also does is ensure that any existing widgets & their … Read more