JavaScript in WordPress Customizer

This is because you are using wp_kses_post to sanitize the output data, try without it: <?php echo get_theme_mod( ‘script-code’); ?> also remove it from here: $wp_customize->add_setting ( ‘script-code’, array ( ‘default’ => esc_html__( ‘Script Code’, ‘x’ ), ‘sanitize_callback’ => ” // remove wp_kses_post ) ); also make sure you are using the right name of … Read more