Can’t get jQuery to enqueue into post edit script

Use the admin_enqueue_scripts hook to add your own custom script. Put it in an external file, and use wp_localize_script to pass any data from php to javascript. jQuery is already used on the admin side, adding a script tag sourcing it from google will break things. function wpa80418_admin_enqueue( $hook ) { if( ‘post.php’ != $hook … Read more

Enqueue scripts in the footer

From http://codex.wordpress.org/Function_Reference/wp_register_script: <?php wp_register_script( $handle, $src, $deps, $ver, $in_footer ); ?> This means you need to add the $deps and $ver values to wp_register_script() in order to set $in_footer. Like this: wp_register_script( ‘justifiedGallery’, plugins_url(‘js/jquery.justifiedGallery.min.js’, __FILE__), false, // or array(), or array(‘jquery’) if this depends on jQuery ‘1.0’, // or your plugin version, or the version … Read more

Why my wp_enqueue_script doesnt work on some page?

Hi add this code to your Function.php and jquery-ui.js should be loaded correctly on your website. // Register Script function custom_scripts() { wp_register_script( ‘jquery-ui’, ‘/assets/js/jquery-ui.js’, false, false, true ); wp_enqueue_script( ‘jquery-ui’ ); } add_action( ‘wp_enqueue_scripts’, ‘custom_scripts’ );

Using wp_enqueue_script in a wordpress plugin

put these __initLivescore({“c1″:”F0F0F0″,”c2″:”BABCC3″,”c4″:”FFFFFF”,”c5″:”FFFFFF”,”c6″:”C90000″,”affiliate_id”:”0″,”menu”:”1″,”sportFK”:”1″,”odds”:”decimal”,”lang”:”3″,”timezone”:”AUTO”,”selected_tab”:”all”}); code in a js like demo.js file. and then use wp_enqueue_scripts and enqueue this file wp_enqueue_script( ‘script-name1’, ‘http://unibet-affiliate.enetscores.com/xjs/hour/theme/affiliate/361/client’); wp_enqueue_script( ‘script-name2’, plugin_dir_path( __FILE__ ) . ‘/demo.js’, array(), ‘1.0.0’, true );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)