add_section( 'blogwhite_excerpt_options', array( 'title' => esc_html__( 'Excerpt Options', 'blogwhite' ), 'priority' => 100, 'panel'=>'blogwhite_theme_options', ) ); $wp_customize->add_setting( 'blogwhite_excerpt_length',array( 'default' => 20, 'sanitize_callback' => 'blogwhite_sanitize_number_range', ) ); $wp_customize->add_control( 'blogwhite_excerpt_length', array( 'label' => esc_html__( 'Excerpt Length (no. of words)', 'blogwhite' ), 'section' => 'blogwhite_excerpt_options', 'settings' => 'blogwhite_excerpt_length', 'type' => 'number', 'input_attrs' => array( 'min' => 5, 'max' => 200, 'step' => 1, ), ) ); // Index Post section $wp_customize->add_section( 'blogwhite_display_section' , array( 'title' => __('Index Post Options', 'blogwhite'), 'priority' => 20, 'panel'=>'blogwhite_theme_options', ) ); // category setting $wp_customize->add_setting( 'blogwhite_category_display' , array( 'default' => true, 'sanitize_callback' => 'blogwhite_sanitize_checkbox', ) ); $wp_customize->add_control( new blogwhite_Toggle_Checkbox_Custom_control( $wp_customize,'blogwhite_category_display', array ( 'label' => esc_html__( 'Category display', 'blogwhite' ), 'settings' => 'blogwhite_category_display', 'section' => 'blogwhite_display_section', 'type' => 'checkbox', ) ) ); // date setting $wp_customize->add_setting( 'blogwhite_date_display' , array( 'default' => true, 'sanitize_callback' => 'blogwhite_sanitize_checkbox', ) ); $wp_customize->add_control( new blogwhite_Toggle_Checkbox_Custom_control( $wp_customize,'blogwhite_date_display', array ( 'label' => esc_html__( 'date_display', 'blogwhite' ), 'settings' => 'blogwhite_date_display', 'section' => 'blogwhite_display_section', 'type' => 'checkbox', ) ) ); // author setting $wp_customize->add_setting( 'blogwhite_author_display' , array( 'default' => true, 'sanitize_callback' => 'blogwhite_sanitize_checkbox', ) ); $wp_customize->add_control( new blogwhite_Toggle_Checkbox_Custom_control( $wp_customize,'blogwhite_author_display', array ( 'label' => esc_html__( 'author_display', 'blogwhite' ), 'settings' => 'blogwhite_author_display', 'section' => 'blogwhite_display_section', 'type' => 'checkbox', ) ) );