Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8745911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:06:44+00:00 2026-06-13T12:06:44+00:00

I always, always have trouble getting jQuery to work in wordpress. I really need

  • 0

I always, always have trouble getting jQuery to work in wordpress.

I really need some clarification and explination on just how this thing works.

Here is my code and I can’t seem to see what is wrong with it.

In the functions.php file:

function my_init() {
if (!is_admin()) {
    // comment out the next two lines to load the local copy of jQuery
    // wp_deregister_script('jquery'); 
    // wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2'); 
    wp_enqueue_script('jquery');
} } add_action('init', 'my_init');

And this is in my footer before I call my other jQuery scripts:

<?php wp_enqueue_script("jquery"); ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:06:45+00:00Added an answer on June 13, 2026 at 12:06 pm

    There’re some answers in this post also.

    I’ve encountered this also in the past, and I usually don’t even use the wordpress own jquery if needed. Because the serverside google method is faster. This code below has to work.

    functions.php

    <?php
    
    function google_jquery() {
        wp_deregister_script( 'jquery' );
        wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
        wp_enqueue_script( 'jquery' );
    } 
    
    add_action('wp_enqueue_scripts', 'google_jquery');
    
    ?>
    

    Make sure that wp_head(); is in your header.php file.

    header.php

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <title><?php wp_title(); ?> <?php bloginfo( 'name' ); ?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="screen" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
    <?php wp_head(); ?>
    </head>
    

    You don’t need to call the other jquery scripts in the footer that way. If you’re enqueueing lets say jquery UI scripts then make sure you have
    wp_footer(); in your footer.php file.

    footer.php

    <?php 
    //Footer scripts
    wp_footer(); 
    ?>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I always have trouble with complicated SQL queries. This is what I have $query
I have trouble figuring out why a simple division like this one always returns
I am really having a trouble figuring this one out. I have a table
I am having trouble getting this accomplished. I have one formset with 5 extra
I always have trouble with this when coding my Swing applications, I figured I'd
This is for GNU-Prolog I'm having trouble getting a certain predicate to work. Its
I always have trouble designing the user interface when it come to manage a
I'm having trouble getting my C# Regex working for C++. In C# I have:
I'm having some trouble getting routes to match. I am using base-32 encoded int's
I need to compress some spatially correlated data records. Currently I am getting 1.2x-1.5x

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.