• I’ve been trying to find out how to add this javascript to a theme I’m building (first one from scratch). Specifically, I’m adding it to a template php. I’m having trouble finding the correct way to call for the javascript in the html. Any help would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • wp_enqueue_script()
    https://codex.www.ads-software.com/Function_Reference/wp_enqueue_script

    Review the doc above, and look inside the 2012’s functions.php for more example.

    Thread Starter WP_Noob_75

    (@wp_noob_75)

    I think I need to clarify. What I need to know is how to structure the javascript call in the location where the javascript takes place. As in here:

    <div class=”container”>
    <h1>jQuery slide with minimum height
    <h2>About Billabong</h2>
    <div class=”wrap”>
    <div>
    <p>
    Gordon Merchant founded Billabong in Burleigh Heads on the Gold Coast in 1973. Combining his passion for surfing with hard work, Gordon designed boardshorts, manufacturing them on the kitchen table and selling through local surf shops and markets.
    </p>
    <p>
    Gordon developed his own stitching technique, which made the garments more durable, cost effective and less labor intensive. He employed machinists, moved the operation into a factory, set up a distribution network and sponsored a team of renowned Australian surfers. The business thrived.
    </p>
    <p>
    Since those beginnings, Billabong has expanded its product range to include boardsport products such as wetsuits, watches, surfboards, snowboard outerwear and skateboarding apparel.
    </p>
    <p>
    Information courtesy of Billabong.
    </p>
    </div>
    <div class=”gradient”>
    </div>
    </div>
    <div class=”read-more”>
    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trying to add javascript to a theme template.’ is closed to new replies.