• Resolved mikesilverman

    (@mikesilverman)


    Hi,

    I just installed WordPress and am in the process of configuring it. (I am another refugee from Google’s decision to stop allowing FTP blog publishing!)

    Anyway, on my old Blogger blog, I had a chunk of javascript in my template that pulled down a list of books I was reading from a third-party website (LibraryThing). This was part of my Blogger sidebar, and I want to have it in my WordPress sidebar.

    It’s very simple:

    <script language="javascript" type="text/javascript" src="https://www.librarything.com/jswidget.php?reporton=msilverman&show=recent&header=1&num=10&covers=small&text=title&tag=alltags&css=1&style=4&version=1">

    I figured the way to get this was to use a Text widget and paste the javascript in there.

    However, this doesn’t work.

    According to my understanding of WordPress, from the docs this should work — I am the site admin, and it is a self-hosted blog (not on wordpress.com). The standard Google search wasn’t too helpful — mostly people with wordpress.com blogs running into the wordpress.com block on javascript which doesn’t apply to my self-hosted blog.

    Is there a trick to enabling Javascript in the text widget, or is there another way I need to go?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Can you repost your javascript because what you have pasted above is not complete. It should end with </script>

    There should be no problem posting javascript in your Text Widget. I have it on my site and use it regularly.

    This is one of the reasons why many people move from WordPress.com to www.remarpro.com – to be able to use javascript in Widgets.

    Repost your script and I’ll test it out for you.

    Thread Starter mikesilverman

    (@mikesilverman)

    Diane,

    That was it…it was missing the close script tag.

    What is weird is that Blogger didn’t require that…the chunk of code as posted worked fine in a Blogger template for years.

    When I added the close script tag as you suggested, WordPress picked it up and it worked.

    Thanks!

    You’re welcome!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I add a chunk of javascript to the text widget’ is closed to new replies.