wordpress默认的侧边栏有个 最新评论 小工具,其默认不显示评论内容,下面是修改后可以显示评论作者和评论内容的。 修改文件:wp-includes/default-widgets.php 找到:
if ( $comments ) { // Prime cache for associated posts. (Prime post term cache if we need it for permalinks.) $post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) ); _prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false ); foreach ( (array) $comments as $comment) { $output .= '改为:
if ( $comments ) { foreach ( (array) $comments as $comment) { $output .= ‘
显示效果如下:
推荐站内搜索:服务器、香港云服务器、国外免费全能空间、服务器怎么搭建、韩国服务器推荐、服务器托管价格、php主机、香港vps主机租用、免费com域名注册网站、查询域名、