WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
URL of your site, if possible? – Rarst Dec 24 '10 at 6:39
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
up vote 1 down vote accepted

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.

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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