All posts by Pramod T P

Query to fetch the recent comments – WordPress

<?php
global $wpdb;
$commentQuery = "SELECT * from $wpdb->comments WHERE comment_approved= '1' 
ORDER BY comment_date DESC LIMIT 0 ,5";
$comments = $wpdb->get_results($commentQuery);
foreach ($comments as $comment) {
$url = '<a href="'. get_permalink($comment->comment_post_ID).
'#comment-'.$comment->comment_ID .'">';
?>
<li><?php echo $url; ?><?php echo $comment->comment_author; ?> On 
<?php echo get_the_title($comment->comment_post_ID); ?></a></li>
<?php } ?>

Social Bookmark Sharing option

<a href="http://www.addthis.com/bookmark.php?v=250" 
onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" 
onmouseout="addthis_close()" onclick="return addthis_sendto()">
<img src="http://s7.addthis.com/static/btn/lg-share-en.gif" 
width="125" height="16" alt="Bookmark and Share" style="border:0"></a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=zeegal"></script>