Title: Add External jQuery Script on WP Theme
Last modified: August 11, 2020

---

# Add External jQuery Script on WP Theme

 *  [Rooswati](https://wordpress.org/support/users/roosw19/)
 * (@roosw19)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/add-external-jquery-script-on-wp-theme/)
 * Hi,
 * I want add external jQuery script to WP theme but don’t know how I must do it.
 * Anyone can help?
 * Thanks,
    -  This topic was modified 5 years, 9 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Carike](https://wordpress.org/support/users/carike/)
 * (@carike)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/add-external-jquery-script-on-wp-theme/#post-12556045)
 * Is this for a theme to be hosted in the WordPress.org directory?
    Plugins and
   themes hosted on WordPress.org are not supposed to add their own jQuery libraries.
   Additionally, any code that “phones home” requires opt-in consent.
 *  [Sundar](https://wordpress.org/support/users/phptechie/)
 * (@phptechie)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/add-external-jquery-script-on-wp-theme/#post-13109060)
 * [@roosw19](https://wordpress.org/support/users/roosw19/)
 * Add the following code on function.php & that should help you.
 *     ```
       function themeslug_enqueue_script() {
           wp_enqueue_script( 'jquery-v-2', 'http://code.jquery.com/jquery-2.1.3.min.js', false ); //External Link
           wp_enqueue_script( 'mycustomJs', get_template_directory_uri() . '/default.js', false );
           // here you can enqueue more js / css files 
       }
   
       add_action( 'wp_enqueue_scripts', 'themeslug_enqueue_script' );
       ```
   
    -  This reply was modified 5 years, 10 months ago by [Sundar](https://wordpress.org/support/users/phptechie/).
    -  This reply was modified 5 years, 10 months ago by [Sundar](https://wordpress.org/support/users/phptechie/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add External jQuery Script on WP Theme’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [Sundar](https://wordpress.org/support/users/phptechie/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/add-external-jquery-script-on-wp-theme/#post-13109060)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
