add_setting('asycom_hide_hero_section', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_attr', )); $wp_customize->add_control('asycom_hide_hero_section', array( 'type' => 'checkbox', 'section' => 'asycom_hero_options', // Add a default or your own section 'label' => esc_html__('Hide Hero Section?', 'asycom'), 'description' => esc_html__('The Hero section will disappear if you enable this option', 'asycom') )); /* Hero - Main title */ $wp_customize->add_setting('asycom_main_hero_title', array( 'default' => esc_html__('WEB DESIGN AGENCY', 'asycom'), 'sanitize_callback' => 'wp_filter_nohtml_kses', 'transport' => 'postMessage' ) ); $wp_customize->add_control('asycom_main_hero_title', array( 'label' => esc_html__('Hero Section Title', 'asycom'), 'section' => 'asycom_hero_options', 'type' => 'text', 'description' => esc_html__('Hero Section Main Title', 'asycom') ) ); /* Hero - sub title */ $wp_customize->add_setting('asycom_hero_sub_title', array( 'default' => 'Beautiful, Clean, Well Coded, Business WordPress Theme for Business', 'sanitize_callback' => 'wp_filter_nohtml_kses', 'transport' => 'postMessage' )); $wp_customize->add_control('asycom_hero_sub_title', array( 'label' => esc_html__('Sub Title', 'asycom'), 'section' => 'asycom_hero_options', 'type' => 'text', 'description' => esc_html__('Sub Title of Hero section', 'asycom') ) ); /* Hero - Background */ $wp_customize->add_setting('asycom_hero_bg', array( 'default' => get_stylesheet_directory_uri() . '/images' . '/bg-01.jpg', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'postMessage' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'asycom_hero_bg', array( 'label' => esc_html__('Upload a backgound', 'asycom'), 'section' => 'asycom_hero_options', 'settings' => 'asycom_hero_bg' ) ) ); /* Hero - sub title */ $wp_customize->add_setting('asycom_hero_btn_txt', array( 'default' => 'Read More', 'sanitize_callback' => 'wp_filter_nohtml_kses', 'transport' => 'postMessage' )); $wp_customize->add_control('asycom_hero_btn_txt', array( 'label' => esc_html__('Button Text', 'asycom'), 'section' => 'asycom_hero_options', 'type' => 'text', 'description' => esc_html__('Hero section button Text', 'asycom') ) ); /* Services - Item 1 Link/URL */ $wp_customize->add_setting('asycom_hero_btn_url', array( 'default' => '#', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'postMessage' )); $wp_customize->add_control('asycom_hero_btn_url', array( 'label' => esc_html__('Hero section button Link(URL)', 'asycom'), 'section' => 'asycom_hero_options', 'type' => 'url' ) );