Archived topic
Include .js and .css in a file?
7 replies · Started by Norman on February 20, 2018
Hi team GP,
I want to use this css-animate thing (http://jackonthe.net/css3animateit/) but it says that I should 'Include css3-animated.js at the end of your file and animations.css in the head'. I don't know what this means... Can you help out?
Thanks!
Hi there,
You'll want to upload those files in your child theme.
Then in GP Hooks, add link to the CSS file in the wp_head file.
<link rel="stylesheet" href="YOUR CHILD THEME URL/animations.css" type="text/css">
Then the javascript in the wp_footer hook:
<script src="YOUR CHILD THEME URL/css3-animate-it.js"></script>
Thank you Tom. I'm still not tech savvy with all this stuff. Where do I find the child theme url? Is it the link to the child theme, and should I find it with a FTP app?
If I write the links to the files in the media library it doesn't work..
https://timmerwerkvisserbouw.nl
Thanks!
It would be: https://timmerwerkvisserbouw.nl/wp-content/themes/generatepress_child/your-filename.js
Thanks for your respons Tom. I did try that link, but it still doesn't work.. Could the problem be that GP doesn't load jQuery? In some tutorial it says that jquery.min.js is needed.
Thanks!
EDIT: I tried adding <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
But it didn't do anything..
You have "www" before "wp-content" in your URL to the file.
If you remove that, it should work.
And I thought I had tried 'everything'. Thank you!
You're welcome :)