jQuery include the smart way in functions.php

/ Published in: PHP
Save to your folder(s)

Copy this code and paste it in your HTML
  1. // smart jquery inclusion
  2. if (!is_admin()) {
  3. wp_deregister_script('jquery');
  4. wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"), false);
  5. wp_enqueue_script('jquery');
  6. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.