Title: wp_head   wp_enqueue_script &#8211; problem loading the script into head section
Last modified: August 19, 2016

---

# wp_head wp_enqueue_script – problem loading the script into head section

 *  Resolved [Michael Fields](https://wordpress.org/support/users/mfields/)
 * (@mfields)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/wp_head-wp_enqueue_script-problem-loading-the-script-into-head-section/)
 * Hello. I’m at my wits end with this – maybe someone can help. I would like to
   use jQuery on my blog, but I cannot seem to get to enqueue using `wp_enqueue_script()`.
   This code is in a custom activated plugin:
 *     ```
       add_action('wp_head', 'mfDevLoadScripts');
       function mfDevLoadScripts() {
       	wp_enqueue_script('jquery');
       }
       ```
   
 * Nothing happens! But… If I try:
 * ‘add_action(‘wp_head’, ‘mfDevLoadScripts’);
    function mfDevLoadScripts() { print‘
   flying monkeys’; }`
 * I get “flying monkeys” printed across the top of my screen. Please help if you
   can!
    Thanks!

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

 *  Thread Starter [Michael Fields](https://wordpress.org/support/users/mfields/)
 * (@mfields)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/wp_head-wp_enqueue_script-problem-loading-the-script-into-head-section/#post-672542)
 * OK…. Answered my own question here. This is how you do it do it:
 *     ```
       add_action('init', 'mfDevLoadScripts');
       function mfDevLoadScripts() {
       	wp_enqueue_script('jquery');
       }
       ```
   
 *  [Mark Barnes](https://wordpress.org/support/users/mark8barnes/)
 * (@mark8barnes)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/wp_head-wp_enqueue_script-problem-loading-the-script-into-head-section/#post-673126)
 * For others who may read the thread, and need (like me) to use the wp_head hook
   rather than init, you can also use
    `add_action('wp_head', 'mfDevLoadScripts',
   0);` to ensure the function loads early enough.

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

The topic ‘wp_head wp_enqueue_script – problem loading the script into head section’
is closed to new replies.

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [Mark Barnes](https://wordpress.org/support/users/mark8barnes/)
 * Last activity: [17 years, 5 months ago](https://wordpress.org/support/topic/wp_head-wp_enqueue_script-problem-loading-the-script-into-head-section/#post-673126)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
