Title: wp_enqueue_script not adding my script
Last modified: August 19, 2016

---

# wp_enqueue_script not adding my script

 *  [toddysm](https://wordpress.org/support/users/toddysm/)
 * (@toddysm)
 * [15 years ago](https://wordpress.org/support/topic/wp_enqueue_script-not-adding-my-script/)
 * Hi,
 * My goal is to include Google Maps JavaScript in a particular admin page. I tried
   playing with local scripts on the particular php page as well as on admin index.
   php but it seems the following code does not include the local script even.
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * Is there anything that I am missing? Why isn’t the script included in the resulting
   HTML?
 * Thanks!

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

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [15 years ago](https://wordpress.org/support/topic/wp_enqueue_script-not-adding-my-script/#post-2015157)
 * see if this codex helps: [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
 *  Thread Starter [toddysm](https://wordpress.org/support/users/toddysm/)
 * (@toddysm)
 * [15 years ago](https://wordpress.org/support/topic/wp_enqueue_script-not-adding-my-script/#post-2015182)
 * It seems to work if I use the admin_init action. So far I’ve been using admin_print_scripts
   action and it wasn’t working.
 * I am not sure I am clear when should I use the one vs the other. Is there any
   documentation that describes in what situations should those be used?
 * Thank you!
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [15 years ago](https://wordpress.org/support/topic/wp_enqueue_script-not-adding-my-script/#post-2015187)
 * see if these [threads](http://wordpress.org/search/admin_init+action+using+admin_print_scripts+action?forums=1)
   help.

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

The topic ‘wp_enqueue_script not adding my script’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 3 replies
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/wp_enqueue_script-not-adding-my-script/#post-2015187)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
