-
Notifications
You must be signed in to change notification settings - Fork 1
Options
All options are handled by Wordpress Theme Customizer. Soren has several built in option types that child themes can utilize within themes.
All colors, and font-size options are process with the live LESS compiler. Try to avoid inline styles where necessary and filter soren_less_vars
to create custom LESS variables to use within your theme.
add_filter( 'soren_less_vars', 'my_less_vars');
public function my_less_vars($vars){
$vars[ 'my-new-color' ] = '#777777';
return $vars;
}
//in css
color:@my-new-color;
Options are run through the Settings API in wordpress, using Theme Customizer, and serialized into one array for parent theme, and one array for child theme. To create custom options for your child theme for Theme Customizer, first create a file called yourtheme-options.php
, and require_once within functions.php.
See Vulcan Child Theme for a complete example of adding child theme options.
Settings rely on controls. Soren has several built in custom controls that include;
Soren_WP_Customize_Textarea_Control