Archived topic
Installing CSS & JS files
3 replies · Started by Matt on January 26, 2018
I've purchased an audio player which installs via code rather than a plugin and I'm confused about the instructions (although the maker insists it's very easy to install).
It says: "Insert the supportive CSS and JS files of the player inside the header of the page." It then gives me two lines of code, one that starts "<link href" and the other "script src".
My question: where in GP would I need to insert those two lines?
I'm then given a line that starts "<div class" which I'm directed to install in the preferred part of the page, however I'm using a page builder (Elementor Pro) so would that go there, or in GP?
Hi there,
The wp_head hook should work:
https://docs.generatepress.com/article/hooks-overview/
https://docs.generatepress.com/article/wp-head/
Thank you. The code I downloaded also came with .css and .js files - any idea what I'm supposed to do with them? Is there somewhere in GP where such files can be uploaded and implemented?
The CSS file should be added to the wp_head hook, and the JS file should be added to the wp_footer hook.
You should upload the files inside a child theme: https://docs.generatepress.com/article/using-child-theme/
Let me know if you need more info :)