Title: Can&#039;t load jQuery script
Last modified: August 19, 2016

---

# Can't load jQuery script

 *  [chris](https://wordpress.org/support/users/brokeup/)
 * (@brokeup)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/cant-load-jquery-script/)
 * I am trying to run a custom script. It is showing up in Firebug, but it won’t
   work on the page. I currently only want it to show up on the front page, which
   is front-page.php.
 * I have the following code in my functions.php file
 *     ```
       //Call jQuery
       wp_enqueue_script( 'jquery' );
   
       //Load my script for images
       if ( !is_admin() ) { // instruction to only load if it is not the admin area
          // register your script location, dependencies and version
          wp_register_script('my_script',
              get_bloginfo('template_directory') . '/js/myscript.js',
              '1.0' );
          // enqueue the script
          wp_enqueue_script('my_script');
       }
       ```
   

The topic ‘Can't load jQuery script’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [chris](https://wordpress.org/support/users/brokeup/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/cant-load-jquery-script/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
