- This topic has 7 replies, 3 voices, and was last updated 2 years, 10 months ago by Leo.
June 12, 2018 at 12:20 am #597914Giovanni
I understand that the CSS goes in Customize > Additional CSS.
I’ve tried to add it in a page’s HTML between script tags but doesn’t seem to work.June 12, 2018 at 1:24 am #597949DavidStaffCustomer SupportJune 12, 2018 at 5:24 am #598108Giovanni
Hi David, that’s what I would like to accomplish:
Where do I put the CSS (Additional CSS or Simple CSS)?June 12, 2018 at 5:35 am #598119DavidStaffCustomer Support
Hi, the JS can be added to the WP_Head hook as mentioned above, it will need to wrapped in script tags. e.g
OK you have the Simple CSS plugin, i would put all my CSS in that.June 13, 2018 at 12:43 am #598770Giovanni
That didn’t work out.
Here’s what I’ve done:
1) Created a new page and pasted the html in the text tab.
2) Pasted the css in the Additional css (tried also to put it in the same html page, wrapped in style tags)
3) Pasted the js in the wp_head hook between script tags (tried also to put it in the same html page, wrapped in script tags).June 13, 2018 at 4:51 am #598913DavidStaffCustomer SupportJune 16, 2018 at 2:06 pm #601714Giovanni
There we go!
Few more questions:
1) Is it better to use Simple CSS or Additional CSS?
2) Does all JS go into the wp_footer hook? Even if the script is only supposed to work on specific pages?
3) Is it still necessary to use a child theme?June 16, 2018 at 8:04 pm #601801LeoStaffCustomer Support
1) They are essentially the same. You can see the differences here: https://docs.generatepress.com/article/adding-css/
2) Yes. You will need to use PHP condition tags:
3) Not necessary. See this article for more info:
Let us know if this helps.
- You must be logged in to reply to this topic.