• Resolved xbertschy

    (@xbertschy)


    Hi,

    I would like to create a new color scheme and using it into the customizer, with a clean way ?? I don’t want to edit css/grey.css to create a “white” or “pink” theme. I would like to add a css/white.css or css/pink.css. I did it, but into the customizer, i can’t see the news color coming to select. How to do that ?

    Thx in advance for your support

    Xavier

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Xavier,

    The colour schemes are added to the Customizer via the following code, which you’ll find in the parent theme’s /inc/customizer.php file:

    $wp_customize->add_control( 'writr_color_scheme', array(
    		'label'			    => __( 'Color Scheme', 'writr' ),
    		'section'		    => 'writr_theme_options',
    		'type'              => 'select',
    		'choices'			=> array(
    			'default'       => __( 'Turquoise', 'writr' ),
    			'blue'          => __( 'Blue', 'writr' ),
    			'green'         => __( 'Green', 'writr' ),
    			'grey'          => __( 'Grey', 'writr' ),
    			'purple'        => __( 'Purple', 'writr' ),
    			'red'           => __( 'Red', 'writr' ),
    		),
    		'priority'		    => 3,
    	) );

    I spoke with the author of the Writr theme and he let me know that adding colour schemes to the above code via a child theme is very advanced work.

    You could remove the existing colour scheme options and then call new ones with a separate function. Due to how advanced this is, though, I’m not able to dig into the specific code you need.

    A much simpler option for achieving what you’re after is to add custom CSS for your new colour scheme via a child theme’s style.css file or the editor of a custom CSS plugin.

    Let me know how you decide to go ahead and if you have any extra questions.

    Thread Starter xbertschy

    (@xbertschy)

    Okay. I will select the grey template and customize the css with jetpack CSS plugin… not really happy with the process… but okay for now.

    Maybe a BIG suggestion to the author… update the theme and provide a childtheme with colors options ??

    Thx

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating a New Color Scheme’ is closed to new replies.