add_section( 'service_section' , array( 'title' => __('Services', 'business-store' ), 'description'=> __('First, create a page from home-page template, From Home page settings select the created page as static home page. Create Posts with featured image (service), title and content and select from post dropdown list below. Need unlimited Services and more Service templates Go Pro Version.', 'business-store' ), 'panel' => 'theme_options', ) ); // background Alpha Color Picker setting $wp_customize->add_setting( 'business_store_option[service_section_background_color]', array( 'default' => '#ffffff', 'type' => 'option', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', ) ); // background Alpha Color Picker control $wp_customize->add_control( new business_store_Alpha_Color_Control( $wp_customize, 'business_store_option[service_section_background_color]', array( 'label' => __('Section Background Color','business-store' ), 'section' => 'service_section', 'settings' => 'business_store_option[service_section_background_color]', 'show_opacity' => true, // Optional. 'palette' => business_store_color_codes(), ) ) ); // service section title $wp_customize->add_setting( 'business_store_option[service_section_title]' , array( 'default' => __('Services', 'business-store' ), 'sanitize_callback' => 'sanitize_text_field', 'type'=>'option' )); $wp_customize->add_control('business_store_option[service_section_title]' , array( 'label' => __('Section Title','business-store' ), 'section' => 'service_section', 'type'=>'text', ) ); $wp_customize->selective_refresh->add_partial( 'business_store_option[service_section_title]', array( 'selector' => '#service .section-title', ) ); // service section description $wp_customize->add_setting( 'business_store_option[service_section_description]' , array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'type'=>'option' )); $wp_customize->add_control('business_store_option[service_section_description]' , array( 'label' => __('Section Subtitle','business-store' ), 'section' => 'service_section', 'type'=>'text', ) ); $wp_customize->add_setting( 'service_label2', array( 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new business_store_Label_Custom_control( $wp_customize, 'service_label2', array( 'label' => __('Select existing Posts with featured image (service), title and content','business-store' ), 'section' => 'service_section', ) ) ); global $business_store_all_posts; // post 1 $wp_customize->add_setting( 'business_store_option[service_cat]' , array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'type'=>'option' )); $wp_customize->add_control('business_store_option[service_cat]' , array( 'label' => __('Select Post 1','business-store' ), 'section' => 'service_section', 'type'=>'select', 'choices'=> $business_store_all_posts, ) ); // post 2 $wp_customize->add_setting( 'business_store_option[service_cat2]' , array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'type'=>'option' )); $wp_customize->add_control('business_store_option[service_cat2]' , array( 'label' => __('Select Post 2','business-store' ), 'section' => 'service_section', 'type'=>'select', 'choices'=> $business_store_all_posts, ) ); // post 3 $wp_customize->add_setting( 'business_store_option[service_cat3]' , array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'type'=>'option' )); $wp_customize->add_control('business_store_option[service_cat3]' , array( 'label' => __('Select Post 3','business-store' ), 'section' => 'service_section', 'type'=>'select', 'choices'=> $business_store_all_posts, ) ); // post 4 $wp_customize->add_setting( 'business_store_option[service_cat4]' , array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'type'=>'option' )); $wp_customize->add_control('business_store_option[service_cat4]' , array( 'label' => __('Select Post 4','business-store' ), 'section' => 'service_section', 'type'=>'select', 'choices'=> $business_store_all_posts, ) ); // post 5 $wp_customize->add_setting( 'business_store_option[service_cat5]' , array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'type'=>'option' )); $wp_customize->add_control('business_store_option[service_cat5]' , array( 'label' => __('Select Post 5','business-store' ), 'section' => 'service_section', 'type'=>'select', 'choices'=> $business_store_all_posts, ) ); // post 6 $wp_customize->add_setting( 'business_store_option[service_cat6]' , array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'type'=>'option' )); $wp_customize->add_control('business_store_option[service_cat6]' , array( 'label' => __('Select Post 6','business-store' ), 'section' => 'service_section', 'type'=>'select', 'choices'=> $business_store_all_posts, ) ); // service section image $wp_customize->add_setting( 'business_store_option[service_section_image]' , array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', 'type'=>'option' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize , 'business_store_option[service_section_image]' , array( 'label' => __( 'Service Section Image', 'business-store' ), 'description'=> __('Upload your background image. Important! Uncompressed images will increase your site loading time.','business-store'), 'section' => 'service_section', ) ) ); // service section repeater $wp_customize->add_setting( 'business_store_option[service_section_image_repeat]', array( 'default' => 'no-repeat', 'sanitize_callback' => 'sanitize_text_field', 'type'=>'option' ) ); $wp_customize->add_control( 'business_store_option[service_section_image_repeat]', array( 'label' => __( 'Background Repeat', 'business-store' ), 'section' => 'service_section', 'settings' => 'business_store_option[service_section_image_repeat]', 'type' => 'select', 'choices' => business_store_background_style(), ) );