WordPress is the most Usable Publishing System I ever use and found, there are so many blogger and internet writer uses WordPress on they blog. WordPress has many free themes and plugins, the other reason is, they add nice featured such as widgets, with WordPress Widgets, we can add anything without touching the themes files, just drag and setting and done
On this WP Tricks, I will show you, how to create Custom Widgets. This tricks written by Darren Hoyt and Ben Gillbanks, and original published on Darren Hyot Blog
Read the rest of this entry »

Get Recent Comment with Gravatar without plugin
January 24th, 2010 By WP Tricks Posted in TipsMany WordPress User need to display Recent Comment on the sidebar or footer with Gravatar, most of them using plugin, right now I will show you how to Get Recent Comment with Gravatar without plugin. All need to do just write little bit of code and modified as many you want and you need.
On our recent article, I was cover tips to display most commented post with gravatar without plugin, and I hope you’ll enjoy this tricks too, because this trick also simple and of course useful.
Let’s get started, open your sidebar.php or footer.php or whatever files you need to display recent comment and add this code
<?php $query = "SELECT * from $wpdb->comments WHERE comment_approved= '1' ORDER BY comment_date DESC LIMIT 0 ,5"; $comments = $wpdb->get_results($query); if ($comments) { echo '<ul>'; foreach ($comments as $comment) { $url = '<a href="'. get_permalink($comment->comment_post_ID).'#comment-'.$comment->comment_ID .'" title="'.$comment->comment_author .' | '.get_the_title($comment->comment_post_ID).'">'; echo '<li>'; echo '<div class="img">'; echo $url; echo get_avatar( $comment->comment_author_email, $img_w); echo '</a></div>'; echo '<div class="txt">Par: '; echo $url; echo $comment->comment_author; echo '</a></div>'; echo '</li>'; } echo '</ul>'; } ?>Read the rest of this entry »
Amazing Touch
Tags: Code, Comment, Gravatar, Guide, Recent
19 Comments