add_section( 'bizhunt_team_section', array( 'title' => esc_html__( 'Team Section', 'bizhunt' ), 'priority' => 90, 'capability' => 'edit_theme_options', 'panel' => 'bizhunt_front_option', ) ); //Enable Team Section $wp_customize->add_setting( 'bizhunt_team_enable', array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_checkbox', ) ); $wp_customize->add_control( 'bizhunt_team_enable', array( 'label' => esc_html__( 'Enable Team Section', 'bizhunt' ), 'section' => 'bizhunt_team_section', 'type' => 'checkbox', 'priority' => 10, ) ); //Team Section Title $wp_customize->add_setting( 'bizhunt_team_title', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'bizhunt_team_title', array( 'label' => esc_html__( 'Team Section Title', 'bizhunt' ), 'section' => 'bizhunt_team_section', 'type' => 'text', 'priority' => 20, ) ); //Team Section Sub Title $wp_customize->add_setting( 'bizhunt_team_subtitle', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'bizhunt_team_subtitle', array( 'label' => esc_html__( 'Team Section Sub Title', 'bizhunt' ), 'section' => 'bizhunt_team_section', 'type' => 'text', 'priority' => 30, ) ); //Team Section Content $wp_customize->add_setting( 'bizhunt_team_content', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'bizhunt_team_content', array( 'label' => esc_html__( 'Team Section Content', 'bizhunt' ), 'section' => 'bizhunt_team_section', 'type' => 'text', 'priority' => 40, ) ); $team_no = 4; for( $i = 1; $i <= $team_no; $i++ ) { $bizhunt_team_post = 'bizhunt_team_post_' . $i; $bizhunt_team_page = 'bizhunt_team_page_' . $i; //Team Post $wp_customize->add_setting( $bizhunt_team_post, array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( $bizhunt_team_post, array( 'label' => esc_html__( 'Team Post ', 'bizhunt' ).$i, 'section' => 'bizhunt_team_section', 'type' => 'text', 'priority' => 50, ) ); //Team Page $wp_customize->add_setting( $bizhunt_team_page, array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_dropdown_pages', ) ); $wp_customize->add_control( $bizhunt_team_page, array( 'label' => esc_html__( 'Team Page ', 'bizhunt' ).$i, 'section' => 'bizhunt_team_section', 'type' => 'dropdown-pages', 'priority' => 50, ) ); } ?>