How to add this javascript code to a page

  • Unknown's avatar

    I received javascript code to embed a calendar on my website.
    I followed the instructions for adding javascript by creating a custom HTML block, then pasted the javascript.
    The calendar does not render.
    I would appreciate any help! Thanks!!

     //www.trumba.com/scripts/spuds.js
    
    <script type="text/javascript">
    
    $Trumba.addSpud({
    
    webName: "adk-mid-hudson",
    
    spudType : "tabchooser" });
    
    </script>
    
    <script type="text/javascript">
    
    $Trumba.addSpud({
    
    webName: "adk-mid-hudson",
    
    spudType : "main" });
    
    </script>


    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Duh.
    Added the code as HTML instead of javascript and VOILA!
    Problem resolved.

  • Hello!

    It’s great to hear you got it working! I’m glad adding the code in a Custom HTML block did the trick.

    For future reference, you can always check out this guide on adding code to your WordPress.com website: https://wordpress.com/support/code/.

    It walks you through adding HTML, CSS, and JavaScript so you can embed features like calendars, forms, and more.

    If you have any other questions or run into any issues, just let me know, I’ll be happy to help!

Log in or create an account to reply