[resolved] Enqueue jQuery (3 posts)

  1. MultiformeIngegno
    Posted 4 years ago #

    Hi everyone! :)
    I created a TwentyEleven child theme and I was wondering what's the best way to include jQuery. If I'm not wrong TwentyTen included it by default, and I could call it with <?php wp_enqueue_script("jquery"); ?> .

    If I try to add that in my <head> tags it doesn't work. Is there a new way to include it?

    Thanks in advance!

  2. Rachel Baker
    Posted 4 years ago #

    Using any theme you should be able to use <?php wp_enqueue_script("jquery"); ?> in your theme to enqueue the jQuery version included in WordPress.

    You may have a plugin installed that is de-registering the WordPress default. In that case you can add it to your theme using this script:

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

  3. MultiformeIngegno
    Posted 4 years ago #

    Ok, I'm sorry.. it was my fault. I added the enqueue script in the <head> tags but in the code it appeared after the footer (so I didn't see it) :P

    Marking topic as solved! ;)

Topic Closed

This topic has been closed to new replies.

About this Topic