<?php 

// Excerpt 
$wp_customize->add_section(
    'vastnews_excerpt_options',array(
        'panel'=>'vastnews_theme_options',
        'title' => esc_html__( 'Excerpt', 'vastnews' ),
    )
);
    
    
$wp_customize->add_setting(
    'vastnews_excerpt_length',array(
        'default'           => 20,
        'sanitize_callback' => 'vastnews_sanitize_number_range',
    )
);
    
$wp_customize->add_control(
    'vastnews_excerpt_length',
    array(
        'label'       => esc_html__( 'Excerpt Length (no. of words)', 'vastnews' ),
        'section'     => 'vastnews_excerpt_options',
        'settings'    => 'vastnews_excerpt_length',
        'type'        => 'number',
        'input_attrs' => array(
            'min'  => 5,
            'max'  => 200,
            'step' => 1,
        ),
    )
);


// Index Post section
 
$wp_customize->add_section( 'vastnews_display_section' , array(
    'title' => __('Index Post Options', 'vastnews'),
    'priority'   => 20,
    'panel'=>'vastnews_theme_options',
) );


// category setting
$wp_customize->add_setting( 'vastnews_category_display' , array(
    'default'     => true,
    'sanitize_callback' => 'vastnews_sanitize_checkbox',
) );


$wp_customize->add_control( 'vastnews_category_display', array(
    'label'  => esc_html__( 'Display category', 'vastnews' ),
    'section' => 'vastnews_display_section', 
    'settings' => 'vastnews_category_display',
    'type'     => 'checkbox',
   
) );


// date setting
$wp_customize->add_setting( 'vastnews_date_display' , array(
    'default'     => true,
    'sanitize_callback' => 'vastnews_sanitize_checkbox',
) );

$wp_customize->add_control( 'vastnews_date_display', array(
    'label'  => esc_html__( 'Display date', 'vastnews' ),
    'section' => 'vastnews_display_section', 
    'settings' => 'vastnews_date_display',
    'type'     => 'checkbox',
   
) );


// author setting
$wp_customize->add_setting( 'vastnews_author_display' , array(
    'default'     => true,
    'sanitize_callback' => 'vastnews_sanitize_checkbox',
) );

$wp_customize->add_control( 'vastnews_author_display', array(
    'label'  => esc_html__( 'Display author', 'vastnews' ),
    'section' => 'vastnews_display_section', 
    'settings' => 'vastnews_author_display',
    'type'     => 'checkbox',
   
) );