I'm looking to get the comment counts from tales to show inside a Wordpress sidebar widget. Your comments ought to are run by Facebook comments.

The widget under consideration is known as 'Most Read Posts in XX days' and understandably it shows typically the most popular blogs inside a given period. Things I am wishing to attain is to achieve the comment count of the story display near the title. I would like it to be formatted the following:

  Blog post title here | Speech bubble image X

where 'X' represent the amount of comments.

The widget (php) uses the next code presently to output:

if ($output) {
echo '<ul>';
foreach ($output as $line) {
 $views = " (".($line->cnt).")";
 $t = str_replace("'","&apos;", $line->post_title);
 echo "<li>  <a title='". $t . $ttviews . "' href='" . get_permalink($line->post_ID) . "'>".($line->post_title)."</a>  ";

 if ($widget_show_hits == 'yes') {  
    echo $views;
 echo "</li>";
echo '</ul>';
 } else {
echo '<ul><li>' . __('No results available', 'most_read') . '</li></ul>';

How do i add a picture tag, together with the facebook comment count for wordpress posts?