WordPress.org

Ready to get started?Download WordPress

Forums

Changing the default widgets within a sidebar (1 post)

  1. everina
    Member
    Posted 1 year ago #

    $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?

Topic Closed

This topic has been closed to new replies.

About this Topic