Site logo

Archived topic

adding style sheet in hooks

3 replies · Started by Sharif on March 14, 2018

Viewing posts 1–4 of 4

Hi,
I want to add these two to GP theme.
<p>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.css" integrity="sha384-TEMocfGvRuD1rIAacqrknm5BQZ7W7uWitoih+jMNFXQIbNl16bO8OZmylH/Vi/Ei" crossorigin="anonymous">
</p>
<p>
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.js" integrity="sha384-jmxIlussZWB7qCuB+PgKG1uLjjxbVVIayPJwi6cG6Zb4YKq0JIw+OMnkkEC7kYCq" crossorigin="anonymous"></script>
</p>
Can I add them to hooks or is there any other way to add them?

Hi there,

Try wp_head hook.

Let me know if this helps.

Hi Leo,
It did not work.
These are some style and js files for math equations rendering. I added them to wp_head but equations are not rendered.

wp_head is the correct hook to use.

However, simply adding the scripts won't make what you're doing work automatically. There's usually some sort of config you have to set up with javascript.

This archived topic is closed to new replies.