thomasfilm
Member
Posted 1 year ago #
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!
thomasfilm
Member
Posted 1 year ago #
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!