Hello,
I use a code to set the colours palette in GP and GBlocks, but it seems not working in WP Show Post…
which code should I use to set colours palette in WP Show Post?
https://share.getcloudapp.com/JruDv7kL
this is my actual code:
add_action( 'after_setup_theme', function() {
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'Rojo Pri' ),
'slug' => 'rojo_main',
'color' => '#ea2121',
),
array(
'name' => __( 'Rojo Claro' ),
'slug' => 'rojo_ligth',
'color' => '#f94141',
),
array(
'name' => __( 'Rojo Oscuro' ),
'slug' => 'rojo_oscuro',
'color' => '#bf0202',
),
array(
'name' => __( 'Verde' ),
'slug' => 'verde',
'color' => '#bf0202',
),
array(
'name' => __( 'GRIS' ),
'slug' => 'gris',
'color' => '#3f3f3f',
),
array(
'name' => __( 'Gris Claro' ),
'slug' => 'gris_light',
'color' => '#b7b6b5',
),
) );
} );
/* 8 colours */
add_filter( 'generate_default_color_palettes', 'tu_custom_color_palettes' );
function tu_custom_color_palettes( $palettes ) {
$palettes = array(
'#000000',
'#FFFFFF',
'#ea2121',
'#bf0202',
'#bf0202',
'#1e72bd',
'#3f3f3f',
'#b7b6b5',
);
return $palettes;
}
thanks