Title: Customizer.js does not load
Last modified: August 22, 2016

---

# Customizer.js does not load

 *  Resolved [Buckminster](https://wordpress.org/support/users/buckminster/)
 * (@buckminster)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/customizerjs-does-not-load/)
 * Hey guys,
    I’ve walked through this tutorial: [http://codex.wordpress.org/Theme_Customization_API](http://codex.wordpress.org/Theme_Customization_API)
 * And I added the last script: **Sample Theme Customization Class**
 * But this part :
 *     ```
       public static function live_preview() {
             wp_enqueue_script(
                  'mytheme-themecustomizer', // Give the script a unique ID
                  get_template_directory_uri() . '/assets/js/theme-customizer.js', // Define the path to the JS file
                  array(  'jquery', 'customize-preview' ), // Define dependencies
                  '', // Define a version (optional)
                  true // Specify whether to put in footer (leave this true)
             );
          }
       ```
   
 * does not seem to load the theme-customizer.js script.
 * It’s been two days now, and I don’t know how to fix it 🙁

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [Buckminster](https://wordpress.org/support/users/buckminster/)
 * (@buckminster)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/customizerjs-does-not-load/#post-5286618)
 * Anybody ??
 *  [gotgotf](https://wordpress.org/support/users/gotgotf/)
 * (@gotgotf)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/customizerjs-does-not-load/#post-5286623)
 * Codex here /
    [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
 * Use this in your function.php/
    <?php function live_preview() { wp_enqueue_script(‘
   mytheme-themecustomizer’, get_template_directory_uri() . ‘/assets/js/theme-customizer.
   js’, array( ‘jquery’ ), ”, true ); } add_action( ‘wp_enqueue_scripts’, ‘live_preview’);?
   >
 *  Thread Starter [Buckminster](https://wordpress.org/support/users/buckminster/)
 * (@buckminster)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/customizerjs-does-not-load/#post-5286671)
 * Thank you gotgotf for your response,
 * But it still does not work, I think the problem is from this hook: _customize\
   _preview\_init_
 *  [gotgotf](https://wordpress.org/support/users/gotgotf/)
 * (@gotgotf)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/customizerjs-does-not-load/#post-5286691)
 * what is your Url please ?
 *  Thread Starter [Buckminster](https://wordpress.org/support/users/buckminster/)
 * (@buckminster)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/customizerjs-does-not-load/#post-5286717)
 * It’s just local.
 * I installed the last WP version(4.0), and I added this class.
 *  Thread Starter [Buckminster](https://wordpress.org/support/users/buckminster/)
 * (@buckminster)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/customizerjs-does-not-load/#post-5286726)
 * Strange… I just re-downloaded the whole thing and repeat everything, and then
   things works.
 * thank you **gotgotf** very very much for your time 🙂
 * **Edit:** The problem was I didn’t add ‘wp_footer()’ 🙁
 *  [gotgotf](https://wordpress.org/support/users/gotgotf/)
 * (@gotgotf)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/customizerjs-does-not-load/#post-5286753)
 * Nice.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Customizer.js does not load’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [gotgotf](https://wordpress.org/support/users/gotgotf/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/customizerjs-does-not-load/#post-5286753)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
