• I am developping a child theme for Twenty Twenty.

    The theme injects CSS styles into the head – I guess it takes its colors from the _functions.php_ file. How can I overwrite these settings in _functions.php_ in the child theme.

    And what does Get the value from the theme-mod. mean?

    function twentytwenty_get_color_for_area( $area = 'content', $context = 'text' ) {
    
    	// Get the value from the theme-mod.
    	$settings = get_theme_mod(
    		'accent_accessible_colors',
    		array(
    			'content'       => array(
    				'text'      => '#000000',
    				'accent'    => '#cd2653',
    				'secondary' => '#6d6d6d',
    				'borders'   => '#dcd7ca',
    			),
    			'header-footer' => array(
    				'text'      => '#000000',
    				'accent'    => '#cd2653',
    				'secondary' => '#6d6d6d',
    				'borders'   => '#dcd7ca',
    			),
    		)
    	);
    • This topic was modified 4 years, 8 months ago by phlow.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Child Theme for 2020 – How can I change the color settings in functions.php’ is closed to new replies.