WordPress.org

Ready to get started?Download WordPress

Forums

Boilerplate
[resolved] adding javascript (5 posts)

  1. Jomez
    Member
    Posted 10 months ago #

    I want to add a small simple jquery-script to my site.
    I checked the "Site-specific JS" checkbox; but when I add my scripts in script-starter.js nothing happens. Even an alert-message for testing does not respond. Can someone tell me if I am doing something wrong in adding javascript?

  2. Andrew
    Forum Moderator
    Posted 10 months ago #

    Are you using some browser developer tool like Firebug so that you can get access to the browser's console log?

  3. Jomez
    Member
    Posted 10 months ago #

    Okay; I just found out I have to rename script-starter.js to script.js.
    Now it works.
    Thanks

  4. joga3001
    Member
    Posted 6 months ago #

    Hi, I have similar issue:

    I checked the "Site-specific JS" checkbox, I rename script-starter.js to script.js and add the code in the footer (<script type='text/javascript' src='http://my-site.com/wp-content/themes/boilerplate/js/script.js'></script>) but it still not working... what else do I need to do?

    the version of my theme is 4.4.1

  5. Aaron T. Grogg
    Member
    Theme Author

    Posted 6 months ago #

    @joga3001: you shouldn't have to add any code to the page, checking the "Site-specific JS" checkbox should add the <script> tag to the page for you.

    and that should just do it...

    you have a URL i could look at?

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.