get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; //welcome message - section $wp_customize->add_section ( 'aniki_welcome_message_section', array( 'title' => esc_html__('Welcome message', 'aniki'), 'priority' => 21, ) ); //welcome message - setting $wp_customize->add_setting ( 'aniki_welcome_message_setting', array( 'default' => esc_html__('Hey there, nice to meet you! Thanks for coming by to my awesome blog site. I hope you enjoy your stay here and give me some feedback on the content I provided.', 'aniki'), 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage', ) ); $wp_customize->add_control ( 'aniki_welcome_message_setting', array( 'type' => 'textarea', 'label' => esc_html__('Welcome message text', 'aniki' ), 'description' => esc_html__('Add your welcome message below', 'aniki' ), 'section' => 'aniki_welcome_message_section', 'setting' => 'aniki_welcome_message_setting', ) ); } add_action( 'customize_register', 'aniki_customize_register' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function aniki_customize_preview_js() { wp_enqueue_script( 'aniki_customizer', get_template_directory_uri() . '/assets/src/scripts/customizer.js', array( 'customize-preview' ), ANIKI_THEME_VERSION, true ); } add_action( 'customize_preview_init', 'aniki_customize_preview_js' );