I'm utilizing a test atmosphere to get jquery employed in wordpress, cellular phone version is 3.2.1 and also the theme is 2010 (although I've attempted this inside a couple of different styles, same result). You will find no plug-inches installed.

Essentially I'm putting this within the header file to ascertain if I'm able to get jQuery to operate.

<script type="text/javascript">

also have attempted this



// Use jQuery via $j(...)

I am unable to appear to have it to show the alert once the page loads. After I check firebug the script has loaded.

jQuery works fine if not used along with Wordpress and all sorts of scripts examined outdoors of Wordpress perform not surprisingly.

Should it operate in Wordpress 3.2.1? So what can I attempt?

By utilizing wp_enqueue_script you're certain the jQuery library is loaded ONCE. You can observe here how you can load a JS file.

Obviously jQuery works within Wordpress but I don't know whether it's already incorporated inside the Twenty-Ten theme automatically. Determine when the script includes tags exist. You'll need something similar to this within the header somewhere before you call any JavaScript that utilizes jQuery...

<script type='text/javascript' src='/jquery.js?ver=1.6.1'></script>

(Make certain you are excluding it more often than once or multiple versions.)


The above mentioned response is not step-by-step instructions concerning how to add jQuery. I am telling him to check on and find out whether it's already there, then I am telling him not to include it again Whether it's already there.

As pointed out in comments, wp_enqueue_script is the best way to add jQuery to Wordpress, if you want to add jQuery.

Perhaps you have added the particular jQuery script file?

You will find various ways to get this done, however i usually make use of the following method by including this code within the functions.php file.

    function add_jquery() {
       wp_enqueue_script( 'jquery' );

    add_action('init', 'add_jquery');

Here is another good resource for additional jQuery + Wordpress usage: http://www.ericmmartin.com/5-tips-for-using-jquery-with-wordpress/

Make certain Wordpress itself (or any other installed wordpress plugin) doesn't have a previously embedded jQuery version that conflicts with yours.. See the supply of your page and make certain just one jQuery version is loaded. Is going w/o problems.