Pokaż Twój Kod v.0.1

	function recentcomments($atts, $content = null) {
        extract(shortcode_atts(array(
                "num" => '5',                
      ), $atts));

$comments = get_comments('status=approve&number='.num.'');

if ($comments) {
   

    foreach ($comments as $comment) {
    
    echo "<li class=\"list-item fix\">\n";
      echo '<span class="list_thumb list-thumb">' . get_avatar( $comment->comment_author_email, $size=45);   echo '</span>';
        echo '<div class="list_item_text">';
 echo '<a href="'. get_permalink($comment->comment_post_ID).'#comment-'.$comment->comment_ID .'">';
$comment_string = $comment->comment_content;
		$comment_excerpt = substr($comment_string,0,65);

		echo $comment_excerpt;
		if (strlen($comment_excerpt) > 64){
			echo '...';
	}
else{
	
}

echo '</a><p><small><span class="list_describe">';
       echo '<span class="recent_comment_name">' . $comment->comment_author . '</span>';
  echo ', '; the_time(get_option('date_format'));
    echo '</div></span></li></small>';
		


 }   
}	
 }  

add_shortcode("comments", "recentcomments"); 
	
Polish Teacher in London Sternik motorowodny Żeglarz jachtowy