wordpress评论样式
修改wordpress 评论样式:
修改位置:wordpress/wp-includes/default-widgets.php
找到下面的位置,注释的是原本代码,修改成后面的代码:
foreach ( (array) $comments as $comment) {
//$output .= '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_
comment_author_link(), '<a href="' . esc_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
$output .= '<li class="recentcomments">'.sprintf(_x('%1$s', 'widgets'), '<a href="' . esc_url( get_comment_link($comment->comment_ID) ) . '">' . mb_strimwi
dth(strip_tags($comment->comment_content),0,38,'','utf-8') . '</a>') . '</li>';
}
结果对比
修改前:
修改后: