• Hey folks.

    I’m trying to run a script (call to a JS file) on my homepage ONLY.
    <script src="http://MYjsFILE.js"></script>

    How would I include this? and what file would I have to include it in?

    Not sure if its important, but I’m using Magazine Basic as a theme.

    Thanks in advance!
    -Andre

Viewing 1 replies (of 1 total)
  • Thread Starter dsol828

    (@dsol828)

    scratch that – think I’ve figured it out.

    <?php if (is_front_page()) { ?>
    <script src="http://MYjsFILE.js"></script>
    <?php } ?>

    That’s what I’ve included in the “main index” page.
    Anyone have reason to believe that won’t work?

Viewing 1 replies (of 1 total)
  • The topic ‘Call script on homepage only’ is closed to new replies.