add_section( 'blog_cafe_archive_settings', array( 'title' => esc_html__( 'Archive/Blog', 'blog-cafe' ), 'description' => esc_html__( 'Settings for archive pages including blog page too.', 'blog-cafe' ), 'panel' => 'blog_cafe_general_panel', ) ); // Archive excerpt setting $wp_customize->add_setting( 'blog_cafe_archive_excerpt', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'View the post', 'blog-cafe' ), ) ); $wp_customize->add_control( 'blog_cafe_archive_excerpt', array( 'section' => 'blog_cafe_archive_settings', 'label' => esc_html__( 'Excerpt more text:', 'blog-cafe' ), ) ); // number setting $wp_customize->add_setting( 'blog_cafe_blog_archive_column', array( 'sanitize_callback' => 'blog_cafe_sanitize_number_range', 'default' => 1, 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'blog_cafe_archive_excerpt_length', array( 'section' => 'blog_cafe_archive_settings', 'label' => esc_html__( 'Excerpt more length:', 'blog-cafe' ), 'type' => 'number', 'input_attrs' => array( 'min' => 5 ), ) ); // Category enable setting $wp_customize->add_setting( 'blog_cafe_enable_archive_category', array( 'sanitize_callback' => 'blog_cafe_sanitize_checkbox', 'default' => true, ) ); $wp_customize->add_control( 'blog_cafe_enable_archive_category', array( 'section' => 'blog_cafe_archive_settings', 'label' => esc_html__( 'Enable Category.', 'blog-cafe' ), 'type' => 'checkbox', ) ); // Tag enable setting $wp_customize->add_setting( 'blog_cafe_enable_archive_tag', array( 'sanitize_callback' => 'blog_cafe_sanitize_checkbox', 'default' => true, ) ); $wp_customize->add_control( 'blog_cafe_enable_archive_tag', array( 'section' => 'blog_cafe_archive_settings', 'label' => esc_html__( 'Enable tags.', 'blog-cafe' ), 'type' => 'checkbox', ) ); // Featured image enable setting $wp_customize->add_setting( 'blog_cafe_enable_archive_featured_img', array( 'sanitize_callback' => 'blog_cafe_sanitize_checkbox', 'default' => true, ) ); $wp_customize->add_control( 'blog_cafe_enable_archive_featured_img', array( 'section' => 'blog_cafe_archive_settings', 'label' => esc_html__( 'Enable featured image.', 'blog-cafe' ), 'type' => 'checkbox', ) ); ?>