Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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....

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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