Set metabox color picker default to 'none' instead of '#191919' in functions.php

175 Views Asked by At

My WordPress theme has a really annoying colorpicker that are pre set to a specific color (#191919). I want the color picker to always be "cleared" by default instead - without making changes to the parent theme code. My question is if the below is possible to change within the functions.php in my Child Theme?

So I want to set the metabox colurpicker to “none” 'default' => '' instad of 'default' => '#191919'

The original code is in a file in parent theme called metaboxes.php and looks like this:

$cmb_title->add_field( array(
        'name' => __( 'Title Text Color', 'wassap' ),
        'id'   => $prefix . 'color',
        'type' => 'colorpicker',
        'default'  => '#191919'
    ) );

And again – what I want to do is to set the default to: 'default' => '' with the help of funcions.php if that is possible!

Thank you

0

There are 0 best solutions below