[Support request] adding style sheet in hooks

Home Forums Support [Support request] adding style sheet in hooks

Home Forums Support adding style sheet in hooks

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #519569
    Sharif

    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&#8221; 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&#8221; integrity=”sha384-jmxIlussZWB7qCuB+PgKG1uLjjxbVVIayPJwi6cG6Zb4YKq0JIw+OMnkkEC7kYCq” crossorigin=”anonymous”></script>
    </p>
    Can I add them to hooks or is there any other way to add them?

    #519624
    Leo
    Staff
    Customer Support

    Hi there,

    Try wp_head hook.

    Let me know if this helps.

    #519634
    Sharif

    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.

    #519879
    Tom
    Lead Developer
    Lead Developer

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.