add_setting('your_theme_logo', array( 'sanitize_callback' => 'esc_url_raw', )); // Add a control to upload the logo $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'theme_logo', array( 'label' => 'Upload Main Logo', 'section' => 'title_tagline', 'settings' => 'your_theme_logo', ))); } add_action('customize_register', 'your_theme_new_customizer_logo_settings'); function your_theme_new_customizer_logo_next_settings($wp_customize) { // add a setting for the site logo $wp_customize->add_setting('your_theme_srink_logo', array( 'sanitize_callback' => 'esc_url_raw', )); // Add a control to upload the logo $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'your_theme_srink_logo', array( 'label' => 'Upload Srinked Logo', 'section' => 'title_tagline', 'settings' => 'your_theme_srink_logo', ))); } add_action('customize_register', 'your_theme_new_customizer_logo_next_settings'); /** * End Logo Setting and Upload Control */ /** * Setting Social Setup */ function ct_bumbeelbee_social_array() { $social_sites = array( 'twitter' => 'bumbeelbee_twitter_profile', 'facebook' => 'bumbeelbee_facebook_profile', 'instagram' => 'bumbeelbee_instagram_profile', ); return apply_filters('ct_bumbeelbee_social_array_filter', $social_sites); } function my_add_customizer_sections($wp_customize) { $social_sites = ct_bumbeelbee_social_array(); // set a priority used to order the social sites $priority = 5; // section $wp_customize->add_section('ct_bumbeelbee_social_media_icons', array( 'title' => __('Social Media Icons', 'bumbeelbee'), 'priority' => 25, 'description' => __('Add the URL for each of your social profiles.', 'bumbeelbee'), )); // create a setting and control for each social site foreach ($social_sites as $social_site => $value) { $label = ucfirst($social_site); if ($social_site == 'google-plus') { $label = 'Google Plus'; } elseif ($social_site == 'rss') { $label = 'RSS'; } elseif ($social_site == 'soundcloud') { $label = 'SoundCloud'; } elseif ($social_site == 'slideshare') { $label = 'SlideShare'; } elseif ($social_site == 'codepen') { $label = 'CodePen'; } elseif ($social_site == 'stumbleupon') { $label = 'StumbleUpon'; } elseif ($social_site == 'deviantart') { $label = 'DeviantArt'; } elseif ($social_site == 'hacker-news') { $label = 'Hacker News'; } elseif ($social_site == 'whatsapp') { $label = 'WhatsApp'; } elseif ($social_site == 'qq') { $label = 'QQ'; } elseif ($social_site == 'vk') { $label = 'VK'; } elseif ($social_site == 'wechat') { $label = 'WeChat'; } elseif ($social_site == 'tencent-weibo') { $label = 'Tencent Weibo'; } elseif ($social_site == 'paypal') { $label = 'PayPal'; } elseif ($social_site == 'email-form') { $label = 'Contact Form'; } // setting $wp_customize->add_setting($social_site, array( 'sanitize_callback' => 'esc_url_raw', )); // control $wp_customize->add_control($social_site, array( 'type' => 'url', 'label' => $label, 'section' => 'ct_bumbeelbee_social_media_icons', 'priority' => $priority, )); // increment the priority for next site $priority = $priority + 5; } } add_action('customize_register', 'my_add_customizer_sections'); /** * Create custome field in customizer for email address **/ /* * Register Our Customizer Stuff Here */ function email_register_theme_customizer($wp_customize) { // Create custom panel. $wp_customize->add_panel('text_blocks', array( 'priority' => 500, 'theme_supports' => '', 'title' => __('Email', 'bumbeelbee'), 'description' => __('Set editable text for certain content.', 'bumbeelbee'), )); // Add Footer Text // Add section. $wp_customize->add_section('custom_email_text', array( 'title' => __('Change Email', 'bumbeelbee'), 'panel' => 'text_blocks', 'priority' => 10, )); // Add setting $wp_customize->add_setting('email_text_block', array( 'default' => __('default text', 'bumbeelbee'), 'sanitize_callback' => 'sanitize_text', )); // Add control $wp_customize->add_control(new WP_Customize_Control( $wp_customize, 'custom_footer_text', array( 'label' => __('Email Address', 'bumbeelbee'), 'section' => 'custom_email_text', 'settings' => 'email_text_block', 'type' => 'text', ) ) ); // Sanitize text function sanitize_text($text) { return sanitize_text_field($text); } } add_action('customize_register', 'email_register_theme_customizer'); /** * Create Footer Setting and Upload Control */ function theme_footer_customizer($wp_customize) { //adding section in wordpress customizer $wp_customize->add_section('footer_settings_section', array( 'title' => 'Footer Text Section', )); $wp_customize->add_control(new WP_Customize_Header_Image_Control($wp_customize, 'header_image', array( 'label' => __('Header image', 'bumbeelbee'), 'section' => 'header_image_settings', 'settings' => 'header_image_position', ) )); $wp_customize->add_control('text_setting', array( 'label' => 'Footer Text Here', 'section' => 'footer_settings_section', 'type' => 'textarea', )); //adding setting for footer logo $wp_customize->add_setting('footer_logo', array( 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control(new WP_Customize_Upload_Control($wp_customize, 'footer_logo', array( 'label' => __('Footer Logo', 'bumbeelbee'), 'section' => 'footer_settings_section', 'settings' => 'footer_logo', ))); } add_action('customize_register', 'theme_footer_customizer'); /** * End footer Setting and Upload Control */