Theme Author
Tom
(@edge22)
CSS to achieve all of that would be pretty extensive and not compatible with the options in the Customizer.
Instead, you’re much better filtering the defaults:
add_filter( 'generate_option_defaults','tu_child_theme_defaults' );
function tu_child_theme_defaults( $defaults )
{
$defaults[ 'container_width' ] = '978';
$defaults[ 'header_layout_setting' ] = 'contained-header';
$defaults[ 'nav_layout_setting' ] = 'contained-nav';
$defaults[ 'content_layout_setting' ] = 'one-container';
$defaults[ 'footer_layout_setting' ] = 'contained-footer';
return $defaults;
}
That way you can still change the options in the Customizer later.
Let me know if you need more info 🙂
Hi Tom, thanks for the reply. I put your codes inside my child themes’ function.php and it doesn’t seem to affect the layout.
Is this the correct method to do this. Sorry, my WordPress coding skill is a bit average.
Theme Author
Tom
(@edge22)
It will only take affect on new installations that haven’t saved any settings.
This is so you can still override the child theme defaults if you like.
Hi Tom, is it possible to reset the saved settings as if it’s a new installation?
Can it be done by modifying the value within generate_setting column? Below are the details:
MySQL Table: wp_options > generate_settings
Value:
a:5:{s:15:”container_width”;i:1100;s:22:”content_layout_setting”;s:13:”one-container”;s:21:”header_layout_setting”;s:12:”fluid-header”;s:18:”nav_layout_setting”;s:9:”fluid-nav”;s:21:”footer_layout_setting”;s:12:”fluid-footer”;}
Theme Author
Tom
(@edge22)
Best way is to go to “Appearance > GeneratePress” and use the delete customizer settings button.