Script in header ignored
Doug Pitchers last edited by Doug Pitchers
I have been trying to solve this for days.
I have inserted jQuery into the header section with this plugin. The problem is that WordPress ignores all of this code. As if it is not there. Indeed the website appears the same with or without code! Why would this be?
DO I need to add some code the functions.php. I have tried many variations of this with no effect. Do I need to do something else? If yes what?!
I am running the theme of 2011. Is this the problem? I do not see why it would be.
Simply I am asking how I can get my website to run jQuery.
All help very much appreciated
JQuery code below if it makes a difference, as you can see I am simply trying to do a sollover for a couple of images. Before I try some other features once I get WordPress to notice my code.
anand last edited by
The issue is not related to the plugin. I suggest you to use https://stackoverflow.com/questions for these type of questions. You will learn a lot there.
BTY, You will first need to check if jQuery is loaded by your theme or any of the plugins. Because only then you could run jQuery script by simply inserting the code.
Secondly I don't think a theme just developed in 2011 is an issue as long as it is compatible with latest WP or still getting updates.
I hope this will put you in right direction.
PS: You might need to enable script debugging for possible errors. Just Google it or visit https://wordpress.org/support/article/debugging-in-wordpress/#script_debug
PPS: Always backup your site while making changes to ensure site safety or in case you somehow broke it.
Doug Pitchers last edited by
Thanks for the info...I have no idea f this is the plugin or code. The code is pretty far as I can see correct. (can't say for sure as WP not running it!) SO I thought it must be the plugin. So onto week 2 of trying to figure the ONE issue out!
anand last edited by
The following links might be helpful for you.
I don't know why you have added jQuery 3 times. Read the above links for details.
This post is deleted!