WP 3.8 theme customizer error
-
Hi there.
I’m trying to make some customizer for my theme, but i’ve got JS error “Uncaught ReferenceError: wp is not defined ” LOL. I wrote all code based on Codex, maybe it is just WP 3.8 bug? Or what i’m doing wrong?my code – PHP:
add_action( 'customize_preview_init', 'customizer_preview' ); function customizer_preview() { wp_register_script( 'wproto-customizer-preview', get_template_directory_uri() . '/js/admin/screen-customizer.js', '', true ); wp_enqueue_script( 'wproto-customizer-preview', array( 'jquery', 'customize-preview' ) ); }JS:
( function( $ ) { // here i've got an error "wp is not defined" wp.customize( 'blogname', function( value ) { value.bind( function( newval ) { $( '#text-logo .site-title' ).html( newval ); } ); } ); } )( jQuery );please help 🙂
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘WP 3.8 theme customizer error’ is closed to new replies.