add_section( 'bizhunt_fun_section', array( 'title' => esc_html__( 'Fun Facts Section', 'bizhunt' ), 'priority' => 70, 'capability' => 'edit_theme_options', 'panel' => 'bizhunt_front_option', ) ); //Enable Fun Section $wp_customize->add_setting( 'bizhunt_fun_enable', array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_checkbox', ) ); $wp_customize->add_control( 'bizhunt_fun_enable', array( 'label' => esc_html__( 'Enable Fun Facts Section', 'bizhunt' ), 'section' => 'bizhunt_fun_section', 'type' => 'checkbox', 'priority' => 10, ) ); $fun_no = 4; for( $i = 1; $i <= $fun_no; $i++ ) { $bizhunt_fun_icon = 'bizhunt_fun_icon_' . $i; $bizhunt_fun_no = 'bizhunt_fun_no_' . $i; $bizhunt_fun_title = 'bizhunt_fun_title_' . $i; // Fun Facts Icon $wp_customize->add_setting( $bizhunt_fun_icon, array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( $bizhunt_fun_icon, array( 'label' => esc_html__( 'Fun Facts Icon ', 'bizhunt' ).$i, 'description' => esc_html__( 'Use FontAwesome icon class. Example: fa-icon', 'bizhunt' ), 'section' => 'bizhunt_fun_section', 'type' => 'text', 'priority' => 10, ) ); // Fun Facts Number $wp_customize->add_setting( $bizhunt_fun_no, array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_number_absint', ) ); $wp_customize->add_control( $bizhunt_fun_no, array( 'label' => esc_html__( 'Fun Facts Number ', 'bizhunt' ).$i, 'section' => 'bizhunt_fun_section', 'type' => 'number', 'priority' => 10, ) ); // Fun Facts Title $wp_customize->add_setting( $bizhunt_fun_title, array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( $bizhunt_fun_title, array( 'label' => esc_html__( 'Fun Facts Title ', 'bizhunt' ).$i, 'section' => 'bizhunt_fun_section', 'type' => 'text', 'priority' => 10, ) ); } ?>