add_section( 'social_icons_section' , array( 'title' => __( 'Social Icons', 'astrology' ), 'priority' => 30, ) ); // Social Account 1 $wp_customize->add_setting( 'social_icon_1' , array( 'default' => 'fa-facebook', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'social_icon_1', array( 'label' => __( 'Enter Social Icon 1', 'astrology' ), 'section' => 'social_icons_section', ) ); $wp_customize->add_setting( 'social_link_1' , array( 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'social_link_1', array( 'label' => __( 'Enter Link 1', 'astrology' ), 'section' => 'social_icons_section', ) ); // Social Account 2 $wp_customize->add_setting( 'social_icon_2' , array( 'default' => 'fa-twitter', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'social_icon_2', array( 'label' => __( 'Enter Social Icon 2', 'astrology' ), 'section' => 'social_icons_section', ) ); $wp_customize->add_setting( 'social_link_2' , array( 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'social_link_2', array( 'label' => __( 'Enter Link 2', 'astrology' ), 'section' => 'social_icons_section', ) ); // Social Account 3 $wp_customize->add_setting( 'social_icon_3' , array( 'default' => 'fa-instagram', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'social_icon_3', array( 'label' => __( 'Enter Social Icon 2', 'astrology' ), 'section' => 'social_icons_section', ) ); $wp_customize->add_setting( 'social_link_3' , array( 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'social_link_3', array( 'label' => __( 'Enter Link 3', 'astrology' ), 'section' => 'social_icons_section', ) ); // Social Account 4 $wp_customize->add_setting( 'social_icon_4' , array( 'default' => 'fa-pinterest-p', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'social_icon_4', array( 'label' => __( 'Enter Social Icon 4', 'astrology' ), 'section' => 'social_icons_section', ) ); $wp_customize->add_setting( 'social_link_4' , array( 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'social_link_4', array( 'label' => __( 'Enter Link 4', 'astrology' ), 'section' => 'social_icons_section', ) ); // Social Account 5 $wp_customize->add_setting( 'social_icon_5' , array( 'default' => 'fa-skype', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'social_icon_5', array( 'label' => __( 'Enter Social Icon 5', 'astrology' ), 'section' => 'social_icons_section', ) ); $wp_customize->add_setting( 'social_link_5' , array( 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'social_link_5', array( 'label' => __( 'Enter Link 5', 'astrology' ), 'section' => 'social_icons_section', ) ); $wp_customize->add_setting( 'astrology_color_section_primary_color', array( 'default' => '#ad2737', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'astrology_color_section_primary_color', array( 'label' => __('Theme Color','astrology'), 'section' => 'colors', 'settings' => 'astrology_color_section_primary_color', ) ) ); $wp_customize->add_setting( 'astrology_color_section_secondary_color', array( 'default' => '#4d4d4d', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'astrology_color_section_secondary_color', array( 'label' => __('Secondary Color','astrology'), 'section' => 'colors', 'settings' => 'astrology_color_section_secondary_color', ) ) ); } add_action( 'customize_register', 'astrology_customize_register' ); function astrology_custom_css(){ if(get_theme_mod('astrology_color_section_primary_color') == '') { $astrology_color_section_primary_color = '#ad2737'; } else { $astrology_color_section_primary_color = esc_attr(get_theme_mod('astrology_color_section_primary_color')); } if(get_theme_mod('astrology_color_section_secondary_color') == '') { $astrology_color_section_secondary_color = '#4d4d4d'; } else { $astrology_color_section_secondary_color = esc_attr(get_theme_mod('astrology_color_section_secondary_color')); } ?>