0

Hi I do have a code here from my HTML. I just dont know/forgot on how to link scripts in wordpress...

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js1.js?1"><\/script>')</script>
<script type="text/javascript" src="js2.js?1"></script>
2
  • 2
    Read the codex?
    – vancoder
    Aug 16, 2013 at 21:37
  • <?php bloginfo('template_url'); ?> thanks dude Aug 16, 2013 at 22:04

1 Answer 1

1

get_template_directory_uri() is better practice. That said, you should be properly enqueuing (http://codex.wordpress.org/Function_Reference/wp_enqueue_script) your scripts, and should have no reason to call jQuery from Google at all, as jQuery is bundled with WP.

Your Answer

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

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