add_section( 'seos_header_buttons_section' , array( 'title' => __( 'Header Buttons', 'askiw' ), 'priority' => 2, //'description' => __( 'Social media buttons', 'seos-white' ), ) ); $wp_customize->add_setting( 'button_1', array ( 'default' => ' Button 1', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'button_1', array( 'label' => __( 'Button 1 Text', 'askiw' ), 'section' => 'seos_header_buttons_section', 'settings' => 'button_1', 'type' => 'text', ) ) ); $wp_customize->add_setting( 'button_1_link', array ( 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'button_1_link', array( 'label' => __( 'Button 1 URL', 'askiw' ), 'section' => 'seos_header_buttons_section', 'settings' => 'button_1_link', ) ) ); $wp_customize->add_setting( 'button_2', array ( 'default' => ' Button 2', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'button_2', array( 'label' => __( 'Button 2 Text', 'askiw' ), 'section' => 'seos_header_buttons_section', 'settings' => 'button_2', 'type' => 'text', ) ) ); $wp_customize->add_setting( 'button_2_link', array ( 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'button_2_link', array( 'label' => __( 'Button 2 URL', 'askiw' ), 'section' => 'seos_header_buttons_section', 'settings' => 'button_2_link', ) ) ); } add_action( 'customize_register', 'askiw_customize_register_header_buttons' ); function askiw_buttons () { $button1 = get_theme_mod( 'button_1', 'Button 1' ); $button2 = get_theme_mod( 'button_2', 'Button 2' ); ?>