Support

Account

Home Forums Backend Issues (wp-admin) Automatically setting default settings on new multisite install Reply To: Automatically setting default settings on new multisite install

  • However, after giving the above, I would not attempt to set these values on the creation of a new site.

    First I would try using the field key to get the values. Doing this might return the default values that you have set for the fields.

    If using the field keys does not return the default values then I would code the default values where they are used, which is much easier than trying to set all of your default values during site creation.

    
    $value = get_field('your-field-name', 'options');
    if (!$value) {
      $value = 'the default value';
    }
    

    I might event do both of these things at the same time, use the field key to try to get the value and then set a default in code if there is no value.