add_section( 'color_customizer', array( 'title' => __( 'Color Settings', 'buzzpress' ), 'priority' => 10, 'panel' => 'buzzpress_customizer', ) ); } add_action( 'customize_register', 'buzzpress_color_customizer_sections' ); function buzzpress_color_customizer_fields( $fields ) { $fields[] = array( 'type' => 'color-palette', 'settings' => 'buzzpress_color_palate', 'label' => __( 'Theme Color', 'buzzpress' ), 'section' => 'color_customizer', 'priority' => 10, 'default' => '#ffffff', 'transport' => 'postMessage', 'choices' => [ 'colors' => [ '#000000','#333333','#6d6d6d', '#EEEEEE', '#ffffff' ], 'style' => 'round', 'size' => 40 ], 'output' => array( array( 'element' => 'body, .nav-header', 'property' => 'background-color', ), ), ); $fields[] = array( 'type' => 'color-palette', 'settings' => 'buzzpress_text_palate', 'label' => __( 'Text Color', 'buzzpress' ), 'section' => 'color_customizer', 'priority' => 10, 'default' => '#333333', 'transport' => 'postMessage', 'choices' => [ 'colors' => [ '#000000','#333333','#6d6d6d', '#EEEEEE', '#ffffff' ], 'style' => 'round', 'size' => 40 ], 'output' => array( array( 'element' => 'body, html, .entry-title, .entry-title a, .comment-reply-title, .comments-title, .blog-sidebar, .blog-sidebar a, .nav-header, .nav-header a, .nav.navbar-nav li a, .blog-sidebar h2, strong, .blog_post_meta, .blog_post_meta a, span.previous-post, .nav-previous a, .nav-next a, span.next-post, .single-post blockquote, .author-content a, .comment-reply-link:hover, .fn a:hover, #cancel-comment-reply-link:hover, .page-numbers, .footer a, .footer', 'property' => 'color', ), ), ); $fields[] = array( 'type' => 'color-palette', 'settings' => 'buzzpress_header_color', 'label' => __( 'Header Background', 'buzzpress' ), 'section' => 'color_customizer', 'priority' => 10, 'default' => '#ffffff', 'transport' => 'postMessage', 'choices' => [ 'colors' => [ '#000000','#333333','#6d6d6d', '#EEEEEE', '#ffffff' ], 'style' => 'round', 'size' => 40 ], 'output' => array( array( 'element' => '.nav-header', 'property' => 'background-color', ), ), ); $fields[] = array( 'type' => 'color-palette', 'settings' => 'buzzpress_footer_color', 'label' => __( 'Footer Background', 'buzzpress' ), 'section' => 'color_customizer', 'priority' => 10, 'default' => '#ffffff', 'transport' => 'postMessage', 'choices' => [ 'colors' => [ '#000000','#333333','#6d6d6d', '#EEEEEE', '#ffffff' ], 'style' => 'round', 'size' => 40 ], 'output' => array( array( 'element' => '.footer', 'property' => 'background-color', ), ), ); return $fields; } add_filter( 'kirki/fields', 'buzzpress_color_customizer_fields' ); add_action( 'wp_head', 'buzzpress_customize_css' ); function buzzpress_customize_css() { ?>