Want more features on Pastebin? Sign Up, it's FREE!
Guest

johnburn

By: a guest on Aug 15th, 2010  |  syntax: PHP  |  size: 1.54 KB  |  views: 66  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <div class="clear"></div>  </div>  <!-- /Main -->  <!-- Footer -->  <div id="footer">  <!-- Footerbar -->  <div id="footerbar">  <div id="footerbar-left">  <h3>Recent Comments</h3>  <ul class="footerbar-left-in">  <?php $sql = "SELECT * FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' ORDER BY comment_date DESC LIMIT 0 , 3";
  2. $comments = $wpdb->get_results($sql);
  3. foreach($comments as $comment) {
  4.     $data = $comment->comment_author . " @ " . $comment->post_title;
  5.     echo "<li><a href=\"" . get_permalink($comment->comment_post_ID) . "\">" . substr($data, 0, 40) . " ...</a></li>";
  6. } ?>  </ul>  </div>  <div id="footerbar-center">  <h3>Recent Posts</h3>  <ul class="footerbar-center-in">  <?php wp_get_archives('type=postbypost&limit=4'); ?>  </ul>  </div>  <div id="footerbar-right">  <h3>Links</h3>  <ul class="footerbar-right-in">  <li>Designed by: <a href="http://www.myfreeiphone.co.uk/">Free iPhone</a>  <li><a href="http://www.myfreeiphone.co.uk">iPhone Deals</a>  <li><a href="http://www.myfreeiphone.co.uk/contract-free-iphone-3gs.htm">iPhone 4 Pay As You Go</a>  <li><a href="http://www.myfreeiphone4.co.uk">Free iPhone 4</a>  </ul>  </div>  </div>  <!-- /Footerbar -->  <!-- Copyright -->  <div id="copyright">  (c)Copyrighted <a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a>, All Rights Reserved. </div>  <!-- /Copyright -->  </div>  <!-- Footer --> </div></div></div> <!-- /Page --> <?php wp_footer(); ?> </body> </html>
clone this paste RAW Paste Data