• Can anyone offer a good reason to use wp_enqueue_script()? If I control the theme’s header, footer and other PHP scripts (and I don’t call this function), why wouldn’t I use script tags directly? Is there ever a situation where WordPress would throw in another script tag to, say, jQuery?

    I realize there are a lot of scripts included in the wp-includes directory, but it would seem I have less control of which version is called if I use wp_enqueue_script(). I understand using it in a plugin, but a theme?

    I’m open to it, but I guess I just don’t see a clear rationale behind using it in a WordPress theme.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Why use wp_enqueue_script()?’ is closed to new replies.