Add a Theme Customizer Section

 In
/* add settings to create various social media text areas. */ add_action('customize_register', 'my_add_social_sites_customizer'); function my_add_social_sites_customizer($wp_customize) { $wp_customize->add_section( 'my_social_settings', array( 'title' => __('Social Media Icons', 'text-domain'), 'priority' => 35, ) ); $social_sites = my_customizer_social_media_array(); $priority = 5; foreach($social_sites as $social_site) { $wp_customize->add_setting( "$social_site", array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( $social_site, array( 'label' => __( "$social_site url:", 'text-domain' ), 'section' => 'my_social_settings', 'type' => 'text', 'priority' => $priority, ) ); $priority = $priority + 5; } }
Recent Posts
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt