I
I
Iskander_W2016-02-05 15:53:49
WordPress
Iskander_W, 2016-02-05 15:53:49

Why doesn't WordPress see customizer.js?

Conditions:
1) There are WordPress Customizer's theme settings in the /inc/customizer.php folder
2) Customizer.js is connected to it to display changes in real time

function true_customizer_live() {
  wp_enqueue_script(
    'true-theme-customizer',
    get_stylesheet_directory_uri() . '../js/customizer.js', // URL
    array( 'jquery', 'customize-preview' ),
    null,
    true
  );
}
add_action( 'customize_preview_init', 'true_customizer_live' );

3) Everything works on the local server, but not on the hosting.
Questions:
1) Why so?
2) How to fix it?
Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question