Changing the default widgets within a sidebar (1 post)

  1. everina
    Posted 3 years ago #

    $new_active_widgets = array (
            'footer' => array (
        // 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?

Topic Closed

This topic has been closed to new replies.

About this Topic