/ Published in: PHP
This is a custom function to place in your theme's "functions.php" file that will override the typical 1.3.2 version of jQuery included in wordpress with the latest 1.4.2 version (and any future release for that matter). This does not effect the admin section as it has been removed via ' !is_admin()'
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php // Call version 1.4.2 instead of 1.3.2. from Wordpress function jquery_latest() { if ( !is_admin()) { wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', false, '1.4.2' ); } } add_action('init', 'jquery_latest'); // Call in head wp_enqueue_script( 'jquery' );