add_section( 'blog_settings', array( 'title' => __( 'Blog Section', 'blossom-floral-pro' ), 'priority' => 40, 'panel' => 'frontpage_settings', ) ); // blog Title $wp_customize->add_setting( 'blog_text', array( 'default' => __( 'From The Blog', 'blossom-floral-pro' ), 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'blog_text', array( 'label' => __( 'Blog Title', 'blossom-floral-pro' ), 'section' => 'blog_settings', 'type' => 'text', ) ); $wp_customize->selective_refresh->add_partial( 'blog_text', array( 'selector' => '.section-header .blog-title', 'render_callback' => 'blossom_floral_pro_get_blog_text', ) ); // Blog Description $wp_customize->add_setting( 'blog_content', array( 'default' => '', 'sanitize_callback' => 'sanitize_textarea_field', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'blog_content', array( 'label' => __( 'Blog Description', 'blossom-floral-pro' ), 'section' => 'blog_settings', 'type' => 'textarea', ) ); $wp_customize->selective_refresh->add_partial( 'blog_content', array( 'selector' => '.section-header .blog-content', 'render_callback' => 'blossom_floral_pro_get_blog_content', ) ); /** Read More Text */ $wp_customize->add_setting( 'read_more_text', array( 'default' => __( 'READ THE ARTICLE', 'blossom-floral-pro' ), 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'read_more_text', array( 'type' => 'text', 'section' => 'blog_settings', 'label' => __( 'Read More Text', 'blossom-floral-pro' ), ) ); $wp_customize->selective_refresh->add_partial( 'read_more_text', array( 'selector' => '.entry-footer .button-wrap .btn-link', 'render_callback' => 'blossom_floral_pro_get_read_more', ) ); $wp_customize->add_setting( 'top_bg_image', array( 'default' => get_template_directory_uri() . '/images/blog-section-bg-1.png', 'sanitize_callback' => 'blossom_floral_pro_sanitize_image', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'top_bg_image', array( 'label' => __( 'Background Image One', 'blossom-floral-pro' ), 'description' => __( 'This will appear at the top of blog content. The recommended size for image is 1044px by 783px in PNG format.', 'blossom-floral-pro' ), 'section' => 'blog_settings', ) ) ); $wp_customize->add_setting( 'content_bg_image', array( 'default' => get_template_directory_uri() . '/images/home-page-blog-bg.png', 'sanitize_callback' => 'blossom_floral_pro_sanitize_image', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'content_bg_image', array( 'label' => __( 'Background Image Two', 'blossom-floral-pro' ), 'description' => __( 'This will appear at the bottom of the blog content. The recommended size for image is 1920 px by 2138px in PNG format.', 'blossom-floral-pro' ), 'section' => 'blog_settings', ) ) ); $wp_customize->add_setting( 'left_bg_image', array( 'default' => get_template_directory_uri() . '/images/blog-section-left-flower.png', 'sanitize_callback' => 'blossom_floral_pro_sanitize_image', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'left_bg_image', array( 'label' => __( 'Background Image Three', 'blossom-floral-pro' ), 'description' => __( 'This will appear at the left side of blog content. The recommended size for image is 484px by 1027px in PNG format.', 'blossom-floral-pro' ), 'section' => 'blog_settings', ) ) ); $wp_customize->add_setting( 'right_bg_image', array( 'default' => get_template_directory_uri() . '/images/blog-section-right-flower.png', 'sanitize_callback' => 'blossom_floral_pro_sanitize_image', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'right_bg_image', array( 'label' => __( 'Background Image Four', 'blossom-floral-pro' ), 'description' => __( 'This will appear at the right side of blog content. The recommended size for image is 465px by 998px in PNG format.', 'blossom-floral-pro' ), 'section' => 'blog_settings', ) ) ); } add_action( 'customize_register', 'blossom_floral_pro_customize_register_frontpage_blog' );