add_setting( 'text_colour', array( 'default' => $text_colour, 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'text_colour', array( 'section' => 'colors', 'label' => esc_html__( 'Text Colour', 'calico' ), ) ) ); // Primary Colour $wp_customize->add_setting( 'primary', array( 'default' => $primary, 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary', array( 'section' => 'colors', 'label' => esc_html__( 'Primary Colour', 'calico' ), ) ) ); // Footer Background Colour $wp_customize->add_setting( 'footer', array( 'default' => $footer, 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer', array( 'section' => 'colors', 'label' => esc_html__( 'Footer Background Colour', 'calico' ), ) ) ); } add_action( 'customize_register', 'theme_customize_register' ); function theme_get_customizer_css() { ob_start(); $primary = get_theme_mod( 'primary', '' ); if ( ! empty( $primary ) ) { ?> a, a:hover { color: ; } .btn-primary, .wp-block-button__link, .wp-block-search .wp-block-search__button { background-color: ; border-color: ; } #btn-back-to-top, .one-pagination span.current, h4.masonry-title a:hover, a.page-numbers:hover, .tags a:hover, .post-categories a:hover { color: ; } @media (max-width: 991.98px) { nav.one-top-nav { background-color: ; } .sub-menu { background-color: ; color: white; } .menu-item a { color: white; } } .one-footer { background-color: ; } body, p, li, a.page-numbers, h4.masonry-title a, .tags a, .post-categories a, a.page-numbers, .one-comments a { color: ; } footer p{ color: white; }