Created
February 1, 2013 16:24
-
-
Save tomess/4692338 to your computer and use it in GitHub Desktop.
Wordpress: Include jQuery into a Wordpress Theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Replace the URL with the location of what version of jQuery you want to use. | |
if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11); | |
function my_jquery_enqueue() { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null); | |
wp_enqueue_script('jquery'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment