Posts tagged as:

twitter

Twitter Widget

March 14, 2009

Another great tutorial from Kristarella is her twitter widget. You don’t need to download a twitter plugin in order for it to work.

/*Twitter Widget*/
function footer_scripts() { ?>
  <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
  <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/allaboutshae.json?callback=twitterCallback2&count=2"></script>
<?php }
add_action('thesis_hook_after_html', 'footer_scripts');

function twitter_widget() { ?>
  <li class="widget">
      <div id="twitter_div"><ul id="twitter_update_list"><li> </li></ul><img src="<?php bloginfo('template_url'); ?>/custom/images/twitter_48.png" alt="" /></div>
    <p><a href="YOUR TWITTER ADDRESS GOES HERE>tweet with me</a></p>
  </li>
<?php }
add_action('thesis_hook_after_multimedia_box', 'twitter_widget',1);

Next is to customize the widget. Here’s an example of how I have mine coded.

#twitter_div {margin-left:1em;}
  #twitter_div img {float:right;}
  li.widget #twitter_update_list{list-style:none;}
  #twitter_div a{color:#3A93CC;}
  li.widget p a{color:#3A93CC;margin-left:1em;}

{ 0 comments }