$new_active_widgets = array (
'footer' => array (
'text'
)
);
// save new widgets to DB
update_option('sidebars_widgets', $new_active_widgets);
At the moment I’m just trying to get this to work. I have a sidebar called ‘footer’ that I want to change the widgets within. I want to do this through functions.php.
I’m trying to change the default widgets to just a single text widget.
Any idea what I’m doing wrong?
The topic ‘Changing the default widgets within a sidebar’ is closed to new replies.