Sourcecode to a blog?

  • Unknown's avatar

    I found this: http://en.support.wordpress.com/code/posting-source-code/ but it doesn’t say WHERE we can use the short code. I tried it it in a post and a Text/HTML widget but neither worked with the following code. Am I doing something wrong? I’d like it to work in a widget. Here’s the code:

    [code language="javascript"]
    <script type="text/javascript" src="http://www.trumba.com/scripts/spuds.js"></script>
    <script type="text/javascript">
    $Trumba.addSpud({
    webName: "scccalendar",
    spudType : "upcomingphoto" ,
    spudConfig : "Home Page" ,
    teaserBase : "http://www.shoreline.edu/calendars/default.aspx" });
    </script>
    <noscript>Your browser must support JavaScript to view this content.
    Please enable JavaScript in your browser settings then try again.
    Events calendar powered by Trumba</noscript>
    [/code]

    Here’s the blog: http://daag.shoreline.edu

    Thank you for any assistance.

    BTW, Trumba has lots of clients nationwide. How about setting up a tie-in for their calendar system? I can provide a point of contact :)

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

  • Unknown's avatar

    Hi there,

    When I insert the code within a post in the Text Editor, the code displays correctly when published as demonstrated here:

    Screen Shot 2014 05 13 at 2 22 04 PM

    Here’s how the code is working in the sidebar Text widget:

    Screen Shot 2014 05 13 at 2 23 35 PM

    Can you try copying and pasting the code one more time? If it still doesn’t work, can you leave it on your sidebar so I can troubleshoot further?

    Regarding the Trumba integration, I’ll pass this along to our partnership team. If they’re interested, one of our team members will reach out!

  • Unknown's avatar

    Hi Jeremy,

    Thanks for your response. I guess i misunderstood what would happen. I thought that

    [code language="javascript"].....[/code]

    would allow the specified code to actually run, right in that space.

    Your screenshots are revealing the code, itself, without any functionality. Actually, I had that result too.

    I was hoping I could run our calendar javascript in the sidebar widget…There’s just no way to do something like that, is there (on wordpress.com)?

  • Unknown's avatar

    Ah – sorry for the misunderstanding! There currently is not a way to run that code. Javascript is a code that we block for security reasons as described here:

    Add Code to Your Site

    The “code” shortcode just displays the code in the correct formatting.

    Let me know if you need anything else!

  • The topic ‘Sourcecode to a blog?’ is closed to new replies.