Adding scripts (3 posts)

  1. alvaro05
    Posted 4 years ago #

    I've been using tanzaku theme before. With this theme (I believe as with others) to add a script I had to do it in the before the </head> tag in header.php . This way (for example):

    <script type="text/javascript">

    But I can't figure out how to make it with Boilerplate theme.
    What am I doing wrong?
    Thanks in advance!


  2. Zenvied
    Posted 3 years ago #

    Hey Alvaro,

    If you go under Appearance -> Boilerplate Admin you will find a checkbox to activate site-specific scripts (script-starter.js). The file is located in the boilerplate theme directory under the js folder. There you will just add your code and you should be good to go.


  3. Aaron T. Grogg
    Theme Author

    Posted 3 years ago #

    Thanks, Zenvied.

    Alvaro: In keeping with best-practices, Boilerplate natively loads jQuery at the end of the <body>, so if you want to use jQuery in the <head>, look for another checkbox under the jQuery section that allows you to move jQuery to the <head>.

    Additionally, once you add your code to the script-starter.js file, you will need to rename that file as script.js. This will allow you to perform upgrades in the future without overwriting your scripts file.


Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic