Support » Theme: Twenty Nineteen » Override Color Palette in Child Theme

  • Resolved earthbranding



    I have set up a child theme and I am trying to override the default color palette defined in /twentynineteen/functions.php but for some reasons the code in /twentynineteen-child/functions.php doesn’t override the parent theme function.

    I don’t want to hack the core as then I have to keep editing the parent theme functions.php every time I update the theme.

    This is the code I am using:

    add_action( ‘after_setup_theme’, ‘twentynineteen_child_setup’ );

    function twentynineteen_child_setup() {

    // Editor color palette.
    ‘name’ => esc_html__( ‘My Red’, ‘twentynineteen’ ),
    ‘slug’ => ‘my-red’,
    ‘color’ => ‘#8D0F03’
    ‘name’ => esc_html__( ‘My Green’, ‘twentynineteen’ ),
    ‘slug’ => ‘my-green’,
    ‘color’ => ‘#3B6C73’

    Can anyone help?

    Also, when customising the theme in [Appearance -> Customize -> Colors] it doesn’t allow to enter an Hex value for the colour, you have to use the drag tool which is very limiting.

    It would be great to have at least three level of colour choice.


Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Override Color Palette in Child Theme’ is closed to new replies.