1

When I build a theme from scratch I have to "enable" sidebars and specific menus in the functions.php.

Similarly, do I need to "enable" access to the javascript and jquery libraries that come bundled with WordPress?

I ask because 2 How-to books I've been using (WordPress 2.8 Theme Design, and Beginning WP 3) both talk about needing to do this and provide code, but neither of them makes explicit whether you need to do this just to make things work in general, or whether you need to do this only if you want to include your own "standalone" javascript(s) as opposed to a script that is part of a plugin/widget.

I'm assuming the latter but want to confirm -

1 Answer 1

1

If you'll be using jQuery in your theme you need to "enqueue" it. If you do not need the JS , ie if you do not run custom jQuery plugins, you don't need to "enqueue" it

via wp_enqueue_script

2
  • Thank you for responding! When you say "custom jQuery" plugins, do you mean a plugin I write myself vs. a plugin I'd select through the portal in WP?
    – PVA
    Commented Jun 13, 2011 at 19:46
  • I mean jQuery JS plugins or if you write your own jQuery code, not the Wordpress plugins. If you don't use jQuery in your theme you do not need to include it. If a wordpress plugin uses jQuery, it will include it, by enqueueing the code, no action is needed from you part Commented Jun 13, 2011 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.