• Hi.

    I would like to know if it is possible to auto activate a widget on installation of WordPress?

    Actually what I am trying to do is automatically activating a widget when a new blog is created in a WP Network.

    Cordially
    Vayu

Viewing 1 replies (of 1 total)
  • Yeah I have the sam problem. It souldn’t be so hard for them who know their way around widget initialization.

    This piece of code can arrage the widgets correctly:

    $w = array( "wp_inactive_widgets" => array(),
                   "startpage_left" => array("x_widget-2", "y_widget-2"
                   "startpage_right" => array(),
                   "content_right" => array("z_widget-4"),
                 );
    update_option( 'sidebars_widgets', $w );

    But since I’m making custom widgets I have to “register” them in the db first… but how is this done?

    TIA Krillo

Viewing 1 replies (of 1 total)

The topic ‘Auto activate widget on install’ is closed to new replies.