0

IN my Wordpress blog, I am looking to update a link in header that I believe is outdated:

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js?ver=3.5.1'></script>

How do I get to this link? What file is it in? In my header.php file, I see wp_head() -- I track that down and it doesn't lead me to anything that I can understand....

3

If done right there should be a callback hooked to wp_enqueue_scripts which has either wp_enqueue_script or both wp_register_script and wp_enqueue_script in it. Something like the following from the Codex:

function themeslug_enqueue_script() {
    wp_enqueue_script( 'my-js', 'filename.js', false );
}
add_action( 'wp_enqueue_scripts', 'themeslug_enqueue_script' );

You will need to find that callback function in your theme or in one of your plugins. You should be able to narrow things down by disabling plugins one by one, and by switching themes to a default theme like Twenty Twelve. Once you find it it should be obvious how to change the path.

If not done right, I have no way to guess what was done or how to alter it.

0

Open your theme's functions.php file (usually located in /wp-content/themes/my_theme/functions.php, replacing my_theme with the directory name of your theme) and do a text search in that file for the function containing the link to the jQuery library.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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