Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 -

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
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 Jun 13 '11 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 –  Daniel Sachs Jun 13 '11 at 20:00
    
Thank you very much for clearing that up for me!!! –  PVA Jun 13 '11 at 21:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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