• Resolved thomasfilm

    (@thomasfilm)


    I have been trying to get jQuery to load for the past two days to no avail. (I am developing a theme from scratch) I put <?php wp_enqueue_script(“jquery”); ?> in my header.php to call it but it doesn’t seem to be loading. I’ve changed to the twentyten theme and my plugins that use js work just fine. I don’t know what im doing wrong? Could someone explain the proper way to load jQuery. Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter thomasfilm

    (@thomasfilm)

    For those of you searching all over the net to figure out why jQuery wont load despite putting <?php wp_enqueue_script(“jquery”); ?> before <?php wp_header() ?> in your header… here is what I figured out is also required to make your javascripts run; which is left out of all the forums I have read… you must put <?php wp_footer() ?> in your footer right before the </body>.

    in header.php:
    <?php wp_enqueue_script(“jquery”); ?>
    <?php wp_head(); ?>
    </head>

    in footer.php:
    <?php wp_footer() ?>
    </body>
    </html>

    I really hope this helps!

Viewing 1 replies (of 1 total)

The topic ‘Can not get jQuery to load’ is closed to new replies.