Registering Jquery and Javascript in the header
-
Hi, I am developing a custom theme from a static site I created (everything works fine on static site) but when I include the scripts in my header.php and check functionality I lose all my functionality. I may not be entering the script in the way that WordPress prefers. Ultimately because this is a theme I am developing for a client I also need the php for wordpress to get the theme directory to pick up those scripts. Because I may have confused you here is the link to the sample theme: http://itestwebpageshere.biz
Currently instead of using something like
<script> src="<?php template_directory ('/js/name_of_script.js') ?></script>I know the above is not the correct php but I cant remember what I tried via the forums but it didnt work anyways so I tried to use the full url to those files in the header.php. Only for it to still not work
So in a nutshell: Why isnt my Javascript and Jquery working for the animation I want to use in the nav menu (simple fade on image on mouse hover, etc.) & how will I effectively tell wordpress to get the Template url /js/my-scripts.js?
Hoping someone with some knowledge with theme development and a little Jquery background can help me troubleshoot this to get it to work like it does in my static mockup.
The topic ‘Registering Jquery and Javascript in the header’ is closed to new replies.