Forums

wp_head working but not when placed before ending head tag? (2 posts)

  1. Rubyfire
    Member
    Posted 8 months ago #

    Ok.. interesting little problem I'm having. I am using wp_enqueue_script function for jQuery and unless wp_head hook is directly under that call jQuery is not called. So, my question is if this is happening how the heck do I get this in the theme directory??

    I'll research more and post a solution as always if I find the solution before I get a response.

    Thanks,
    Bobby

  2. sixhours
    Member
    Posted 8 months ago #

    Shouldn't wp_enqueue_script be used in functions.php, not header.php?

    From the function reference:

    Use the wp_enqueue_scripts action to call this function, or admin_enqueue_scripts to call it on the admin side. Calling it outside of an action can lead to problems. See #11526 for details.

Reply

You must log in to post.

About this Topic