The MU forums have moved to WordPress.org

Default widgets when creating new blogs (2 posts)

  1. Gautier_Girard
    Member
    Posted 15 years ago #

    Hello

    I changed the 'default' MU theme to get my users use by default a theme of my own.

    I'd like to auto-install some widgets (ie 'Categories' Box, 'Subscribe to RSS' box, etc) to simplify stuff for users.

    Is there a simple way to do this ?

    What I did so far isn't correct :
    - I created a new 'test' blog
    - I put the new default theme
    - I activated widgets I'd like to auto-install for each new blog that will be created by users

    Then I altered wp-admin/includes/schema.php
    - I took the columns/fields related to widgets in the wp_x_options table of 'test' blog
    - I've added this stuff as options to schema.php, ie :

    add_option('widget_meta', 'a:1:{s:5:"title";s:0:"";}');

    etc. for each stuff related to widgets. I didn't use the 'update_option' function but 'add_option".

    BUT :
    This doesn't work well : first, at a new blog creation, WPMU changes some of values I've entered. Which breaks the code.
    Secondly, when I correct this stuff in the db to reflect values of the test blog, it doesn't work on the new blog : widgets appear but show strange values.

    How can I auto-install widgets to users'sidebar when they create new blogs ?

    Thanks in advance,

    Gautier

  2. Gautier_Girard
    Member
    Posted 15 years ago #

    Hello,

    Finally! I've found the response... it's here :

    http://mu.wordpress.org/forums/topic.php?id=8041

    ;-)

About this Topic

  • Started 15 years ago by Gautier_Girard
  • Latest reply from Gautier_Girard