Adding jQuery from Google CDN

To add WordPress jQuery from Google Server in your website add this below code in functions.php file:

if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
function my_jquery_enqueue() {
wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://", false, null, TRUE);


Simply copy and paste this below code in your theme footer.php file before the html body tag:

<script src="//"></script>

To check all available libraries hosted by Google visit this below link

Important: Never deregister WordPress jQuery completely from your website. You should add WordPress jQuery from google server if it is not wordpress admin section.

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve : *
3 + 1 =