How do i enable a javascript widget with Wordpress
January 6, 2008 2:02 PM   Subscribe

I've set up a self hosted blog. I've got it looking pretty much how I want it, but I want a javascript based "advert" (it's an animated thing) in the sidebar. The blogging platform is Wordpress, which doesn't allow javascript if the blog is hosted on their servers.

But it's not hosted on I'm hosting it on my own servers. I've tried adding the relevant script text into a text widget, and then adding that to the sidebar, but the script text just gets stripped out.

What do I need to do to get this to work? I'm using Wordpress 2.3.2.
posted by Rabulah to Computers & Internet (5 answers total)
Best answer: You can always add the avert directly into the source code using the Theme Editor (Presentation -> Managing Themes). You'll most likely place the javascript in sidebar.php. Be sure and chmod 777 the files you want to edit via the Theme Editor, else they will be unsavable.
posted by nitsuj at 2:10 PM on January 6, 2008

Best answer: Create a new, blank text widget in Presentation > Widgets. Drag it to your sidebar. Open the widget, past the javascript source code.
posted by jbickers at 2:16 PM on January 6, 2008

um, paste, that is.
posted by jbickers at 2:16 PM on January 6, 2008

Not sure what the problem is -- I host my own WordPress blog, and I have Javascript in one of my sidebar widgets. jbickers' instructions should do it...
posted by danb at 3:23 PM on January 6, 2008

Response by poster: Thanks guys. On checking the page source, it turns out that it's the adverts javascript that's at fault, not Wordpress.
posted by Rabulah at 3:06 AM on January 7, 2008

« Older trying to have an unusual time in new york city   |   Victorian illness Newer »
This thread is closed to new comments.