I have Twitter's own widget set to load on my website, which works just fine. However, on my WP-powered blog the script is included but not rendered. I call it inside an empty div like this:

<?php include $_SERVER['DOCUMENT_ROOT'].'/twtr-widget.html' ?>

But it appears in the page source as HTML (I'm putting '...' to save room):

<script src="http://widgets.twimg.com/j/2/widget.js"></script> 
new TWTR.Widget({...

In other words, the script is not being executed. Why is this?

EDIT: The blog is located here.

  • 1
    URL of your site, if possible? – Rarst Dec 24 '10 at 6:39
  • 1
    With the information you provided in your question, it's not easy to say. I smell some javascript error, but that's more guessing than knowing. – hakre Dec 24 '10 at 10:58
  • Please see edit above. – Isaac Lubow Dec 24 '10 at 16:51

It is hard to say for sure with those floating sidebars, CSS is huge pain to work through.

On the outer layer whole div that holds your widget has display: none; property applied and there are couple more places with same property applied to parts of twitter widget. Overall this seems like a huge CSS conflict.

  • Can confirm the CSS issue from my end. The script gets executed properly. – hakre Dec 25 '10 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.