add_section( 'bizhunt_slider_section', array( 'capability' => 'edit_theme_options', 'priority' => 20, 'title' => __( 'Slider Section', 'bizhunt' ), 'description' => __( 'This is Banner Slider', 'bizhunt' ), 'panel' => 'bizhunt_front_option' ) ); // Enable Slider Section $wp_customize->add_setting( 'bizhunt_show_slider', array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_checkbox', ) ); $wp_customize->add_control( 'bizhunt_show_slider', array( 'label' => esc_html__( 'Show Slider Section', 'bizhunt' ), 'section' => 'bizhunt_slider_section', 'type' => 'checkbox', 'priority' => 10, ) ); $slider_no = 3; for( $i = 1; $i <= $slider_no; $i++ ) { $bizhunt_page = 'bizhunt_slider_page_' . $i; $bizhunt_link = 'bizhunt_slider_video_link_' . $i; // Slider Pages Selection $wp_customize->add_setting( $bizhunt_page, array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_dropdown_pages', ) ); $wp_customize->add_control( $bizhunt_page, array( 'label' => esc_html__( 'Slider Page ', 'bizhunt' ).$i, 'section' => 'bizhunt_slider_section', 'type' => 'dropdown-pages', 'priority' => 20, ) ); //Slider Video Links $wp_customize->add_setting( $bizhunt_link, array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( $bizhunt_link, array( 'label' => esc_html__( 'Slider Video Link ', 'bizhunt' ).$i, 'section' => 'bizhunt_slider_section', 'type' => 'url', 'priority' => 20, ) ); }