Waymond

Untitled

Jun 18th, 2013
48
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function my_scripts_method() {
  2. wp_deregister_script( 'jquery' );
  3. wp_register_script( 'jquery','http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js');
  4. wp_enqueue_script( 'jquery' );
  5. }
  6. add_action('wp_enqueue_scripts', 'my_scripts_method');
  7.  
  8.  
  9.  
  10.  
  11. wp_enqueue_script( 'jquery' ); // Will load jquery from WordPress built in jquery handle
  12.  
  13. wp_register_script(
  14. 'theme-script',
  15. get_stylesheet_directory_uri() . '/js/myscript.js',
  16. array('jquery'), // dependencies
  17. '1', // your version number
  18. true // script in footer
  19. );
  20. wp_enqueue_script( 'theme-script' );
RAW Paste Data