I’m working on sprucing up a few sites and have been working on animated sections using jQuery scripts. I’m a graphic designer so code is not my thing, but I’m learning a lot to be able to do my sites without looking to static and complement my designs.
I believe I need to put he code in a PHP file, but how do I reference the jQuery base files and say I’m using an animated logo section on my main page?
I don’t want to mess up that page template by adding the code there, can I add a separate PHP file like logoani.php to my WP files and somehow call that out for where I need it?
Okay, I have loaded the proper scripts into the WP folder on my server, then added the code suggested below to the .php with my functions. So now I’m looking at adding the rest of the code into my template.
Will the code suggested below insert the extra HTML needed for that script, and if so, how do I make sure it’s placed in the correct module on my WP page?
I know this is a lame question, but I’m really trying to learn this stuff, and oddly haven’t found a good tutorial on what I’m doing.
To add JS-Files to your wordpress-theme, add this code to the functions.php-file in your wordpress-theme-folder:
wp_head and so on, are called action hooks.
For more info: http://www.nathanrice.net/blog/an-introduction-to-wordpress-action-hooks/