add_setting( 'asycom_hide_blog_section', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_attr', ) ); $wp_customize->add_control( 'asycom_hide_blog_section', array( 'type' => 'checkbox', 'section' => 'asycom_blog_options', // Add a default or your own section 'label' => esc_html__( 'Hide Blog Section?','asycom' ), 'description' => esc_html__( 'The Blog section will disappear if you enable this option' ,'asycom') ) ); /* Latest Post - Main title */ $wp_customize->add_setting('asycom_main_blog_title', array( 'default' => esc_html__('LATEST POSTS', 'asycom'), 'sanitize_callback' => 'wp_filter_nohtml_kses', 'transport' => 'postMessage' )); $wp_customize->add_control('asycom_main_blog_title', array( 'label' => esc_html__('Main Title', 'asycom'), 'section' => 'asycom_blog_options', 'type' => 'text', 'description' => esc_html__('Main Title of Latest Post section', 'asycom') ) ); /* Latest Post - sub title */ $wp_customize->add_setting('asycom_blog_sub_title', array( 'default' => 'Read More About Our Company', 'sanitize_callback' => 'wp_filter_nohtml_kses', 'transport' => 'postMessage' ) ); $wp_customize->add_control('asycom_blog_sub_title', array( 'label' => esc_html__('Sub Title', 'asycom'), 'section' => 'asycom_blog_options', 'type' => 'text', 'description' => esc_html__('Sub Title of Latest Post section', 'asycom') ) ); $wp_customize->add_setting('asycom_blog_item_count', array( 'default' => '4', 'sanitize_callback' => 'wp_filter_nohtml_kses' ) ); $wp_customize->add_control( 'asycom_blog_item_count', array( 'label' => esc_html__('How Many Post should be show?', 'asycom'), 'section' => 'asycom_blog_options', 'settings' => 'asycom_blog_item_count', 'type' => 'number' ) ); /* Blog Us - Background */ $wp_customize->add_setting('asycom_blog_bg', array( 'default' => ASYCOM_IMAGES . '/doodles.jpg', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'asycom_blog_bg', array( 'label' => esc_html__('Upload a backgound for blog section', 'asycom'), 'section' => 'asycom_blog_options', 'settings' => 'asycom_blog_bg' ) ) ); /* Latest Post - btn text */ $wp_customize->add_setting('asycom_blog_btn_text', array( 'default' => 'VIEW ALL POSTS', 'sanitize_callback' => 'wp_filter_nohtml_kses', 'transport' => 'postMessage' )); $wp_customize->add_control('asycom_blog_btn_text', array( 'label' => esc_html__('View All post button text.', 'asycom'), 'section' => 'asycom_blog_options', 'type' => 'text' ) ); /* Latest Post - BTN URL */ $wp_customize->add_setting('asycom_blog_btn_url', array( 'default' => '#', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'postMessage' )); $wp_customize->add_control('asycom_blog_btn_url', array( 'label' => esc_html__('View All post button URL', 'asycom'), 'section' => 'asycom_blog_options', 'type' => 'text' ) );