add_section( 'latest_blog_section_settings', array( 'title' => esc_html__( 'Latest Blog Section', 'bizprime' ), 'priority' => 110, 'capability' => 'edit_theme_options', 'panel' => 'theme_front_page_section', ) ); // Setting - show-blog-section. $wp_customize->add_setting( 'theme_options[show-blog-section]', array( 'default' => $default['show-blog-section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show-blog-section]', array( 'label' => esc_html__( 'Enable Blog', 'bizprime' ), 'section' => 'latest_blog_section_settings', 'type' => 'checkbox', 'priority' => 100, ) ); // Setting - main-title-blog-section. $wp_customize->add_setting( 'theme_options[main-title-blog-section]', array( 'default' => $default['main-title-blog-section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'theme_options[main-title-blog-section]', array( 'label' => esc_html__( 'Section Title', 'bizprime' ), 'section' => 'latest_blog_section_settings', 'type' => 'text', 'priority' => 100, ) ); /*No of Blog*/ $wp_customize->add_setting( 'theme_options[number-of-home-blog]', array( 'default' => $default['number-of-home-blog'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[number-of-home-blog]', array( 'label' => esc_html__( 'Select no of blog', 'bizprime' ), 'section' => 'latest_blog_section_settings', 'choices' => array( '1' => __( '1', 'bizprime' ), '2' => __( '2', 'bizprime' ), '3' => __( '3', 'bizprime' ), '4' => __( '4', 'bizprime' ), '5' => __( '5', 'bizprime' ), '6' => __( '6', 'bizprime' ), ), 'type' => 'select', 'priority' => 105, ) ); /*content excerpt in blog*/ $wp_customize->add_setting( 'theme_options[number-of-excerpt-home-blog]', array( 'default' => $default['number-of-excerpt-home-blog'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_positive_integer', ) ); $wp_customize->add_control( 'theme_options[number-of-excerpt-home-blog]', array( 'label' => esc_html__( 'No words of blog', 'bizprime' ), 'section' => 'latest_blog_section_settings', 'type' => 'number', 'priority' => 110, 'input_attrs' => array( 'min' => 1, 'max' => 200, 'style' => 'width: 150px;' ), ) ); /*button text*/ $wp_customize->add_setting( 'theme_options[blog-button-text]', array( 'default' => $default['blog-button-text'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'theme_options[blog-button-text]', array( 'label' => esc_html__( 'Button Text', 'bizprime' ), 'description' => esc_html__( 'Removing the text from this section will disable the button below blog section', 'bizprime' ), 'section' => 'latest_blog_section_settings', 'type' => 'text', 'priority' => 120, ) ); /*button url*/ $wp_customize->add_setting( 'theme_options[blog-button-link]', array( 'default' => $default['blog-button-link'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'theme_options[blog-button-link]', array( 'label' => esc_html__( 'URL Link', 'bizprime' ), 'section' => 'latest_blog_section_settings', 'type' => 'text', 'priority' => 130, ) );