How to load scripts/custom CSS on individual posts/pages in Thrive Themes
If you're using a Thrive Theme then you can have the ability to load scripts / custom CSS both at sitewide level and at post or page level.
How to Add Custom Code at Page Level
While editing a post or page using the default WordPress editor, you'll notice that there are a bunch of Thrive Theme Options displayed underneath.
Click on the tab that says "Custom Code" in this section to view the section where you can add your code:
As you'd expect, you can simply add your code to the relevant field.
Sample Code for Adding Custom Scripts
Alternatively, you can add the code directly to the text area:
console.log("this is an example!");
Sample Code for Adding CSS
In the CSS field, you don't need to add the surrounding tags. You can simply write CSS straight into the field:
- Important! - If you add CSS code to your theme and an individual post - ONLY the CSS code added to the post will apply, overwriting the theme CSS code. You can find out more about this aspect, in this tutorial article.