Can’t get wpColorPicker to work in a widget

Please try this modified code: class widget007 extends WP_Widget { function __construct() { add_action(‘admin_print_styles-widgets.php’, array( $this, ‘load_color_picker_style’ ) ); $args = array( ‘name’ => esc_html__( ‘widget007’, ‘txt-domaine’ ), ‘description’ => esc_html__( ‘Something’, ‘txt-domaine’ ) ); parent::__construct( ‘my_widget007’, ”, $args ); } function load_color_picker_style() { wp_enqueue_style( ‘wp-color-picker’ ); wp_enqueue_script( ‘wp-color-picker’ ); wp_enqueue_script( ‘underscore’ ); } function … Read more

Are there any CSS classes for the wordpress colours?

No. The only styles that WordPress itself loads on the front-end is /wp-includes/css/dist/block-library/style.min.css, and this stylesheet doesn’t include any such classes or colours. All other styles are the responsibility of the theme. So if you want to know if a specific theme has such classes you would need to ask the author, however I don’t … Read more

Trying to customise 2011 Child Theme Background Colour

Background-color: body.custom-background { background-color: #0f0f0f; /* Color for the two borders */ } #page { background: #0f0f0f; /* Color for the content/body part in the center */ } #site-generator { background: #0f0f0f; /* Color for the footer part in the center */ } You can also take it together into one snippet that changes the … Read more