Put CSS in <head>, JS in <body>

In order to get my media player to work correctly, it requires some CSS and JS.
In have to put some CSS inside the <head> tag, and some JS inside the <body> tag.
I added the relevant CSS and JS under X > Theme Options > etc. but so for it is not working, probably because I don’t know how to get the CSS and JS to appear within those tags. Here are the appropriate code snippets.

How do I get these bits of code to load in the appropriate sections each page?

<link href="https://web-player.art19.com/assets/current.css" media="screen" rel="stylesheet" type="text/css">
<script src="https://web-player.art19.com/assets/current.js" type="text/javascript"></script>

Hello @Oortcloudatlas,

Thanks for writing in!

The easiest way to add this scripts in your site is to install “Insert Headers and Footers” plugin.

Once installed, you can go to Settings > Insert Headers and Footers > Header and insert:

<link href="https://web-player.art19.com/assets/current.css" media="screen" rel="stylesheet" type="text/css">

And you can go to Settings > Insert Headers and Footers > Footer to insert this line:

<script src="https://web-player.art19.com/assets/current.js" type="text/javascript"></script>

Hope this helps. Please let us know how it goes.

1 Like

Yeah, that worked. Thank you!

You’re welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.