Arkadaşlar standart olarka bulunan son yorumları nasıl kısalta bilirm.
Örn yazıları "<?php the_excerpt()?>" ile otomatik kısaltıyoruz. Vede benin son yorumlar kodumda "comment_excerpt" şölye bir kod var nasıl kısaltabilirm
kod:
<?php global $wpdb, $comments, $comment;
$comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID, comment_date, SUBSTRING(comment_content,1,50) AS comment_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT 5"); ?>
<ul id="tab_content_comments" class="tab_content_list1"> <!-- Latest comments -->
<?php if ( $comments ) : foreach ($comments as $comment) :
echo '<li>' . sprintf(__('%1$s <span class="commententrytitle">'.'%2$s</span><br />%4$s …'),
'<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '" title="' . $comment->comment_author . ' - ' . get_the_title($comment->comment_post_ID) . '"><span class="meta">' . $comment->comment_author . '</span></a>',
get_the_title($comment->comment_post_ID),
get_permalink($comment->comment_post_ID),
strip_tags($comment->comment_excerpt) ) .'</li>';
endforeach; endif; ?>Kod budur arkadaşlar ben bunun karekterini nerden ayarlayabilirm.Mesela 20 karakter gözükecek.