Inserting a Custom CSS Stylesheet

You can easily add your CSS file using the JavaScript Insertion page. You only need the CSS file's URL.

Adding an Insertion

  1. In the JavaScript Insertions page, click + ADD INSERTION.
  2. Select Custom Script from the Insertion Type menu.
  3. Enter a sort Name.
  4. In the JavaScript Code Editor, paste the following code:
var head = document.getElementsByTagName('HEAD')[0];
// Create new link Element
var link = document.createElement('link');
// set the attributes for link element
link.rel = 'stylesheet';
link.type = 'text/css';
// REPLACE url of file
link.href = 'https.example.com/css/styles.css';
// Append link element to HTML head
head.appendChild(link);