add_section( 'bizhunt_about_section', array( 'capability' => 'edit_theme_options', 'priority' => 30, 'title' => __( 'About Section', 'bizhunt' ), 'description' => __( 'This is About Selection', 'bizhunt' ), 'panel' => 'bizhunt_front_option' ) ); //Enable About Section $wp_customize->add_setting( 'bizhunt_about_enable', array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_checkbox', ) ); $wp_customize->add_control( 'bizhunt_about_enable', array( 'label' => esc_html__( 'Show About Section', 'bizhunt' ), 'section' => 'bizhunt_about_section', 'type' => 'checkbox', 'priority' => 10, ) ); //About $wp_customize->add_setting( 'bizhunt_about_title', array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'bizhunt_about_title', array( 'label' => __( 'About Title: ', 'bizhunt' ), 'section' => 'bizhunt_about_section', 'type' => 'text', 'priority' => 20, 'settings' => 'bizhunt_about_title', ) ); $about_no = 3; for( $i = 1; $i <= $about_no; $i++ ) { $bizhunt_about_page = 'bizhunt_about_page_' . $i; // About Pages Selection $wp_customize->add_setting( $bizhunt_about_page, array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_dropdown_pages', ) ); $wp_customize->add_control( $bizhunt_about_page, array( 'label' => esc_html__( 'About Page ', 'bizhunt' ).$i, 'section' => 'bizhunt_about_section', 'type' => 'dropdown-pages', 'priority' => 30, ) ); } //About Section Video $wp_customize->add_setting( 'bizhunt_about_video_url', array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'bizhunt_about_video_url', array( 'label' => __( 'Video URl ', 'bizhunt' ), 'section' => 'bizhunt_about_section', 'type' => 'url', 'priority' => 40, 'settings' => 'bizhunt_about_video_url', ) ); //video Image $wp_customize->add_setting( 'bizhunt_video_image', array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_image' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'bizhunt_video_image', array( 'label' => __( 'Upload a Image', 'bizhunt' ), 'section' => 'bizhunt_about_section', 'priority' => 50, 'settings' => 'bizhunt_video_image' ) ) );