首先找到根目录下的 wp_includes/default-widgets.php,在functionwidget`(第625行左右)里面找
到以下代码(第655行左右):
| 代码如下 | 复制代码 |
|
if ( $comments ) { author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), ($comment->comment_post_ID) . '') . ' ';} } |
|
将第三行中的
| 代码如下 | 复制代码 |
|
get_the_title($comment->comment_post_ID) 改成 strip_tags( $comment- >comment_content), |
|
同时将sprintf里的on改成你想要显示的文字,如『说』,这样样式就变成
『评论者』说『评论内容』 以下是修改后的代码(注意:修改代码前请先备份)
| 代码如下 | 复制代码 |
|
if ( $comments ) { author, 2: post link */ sprintf(_x('%1$s said: %2$s', 'widgets'), get_comment_author_link (), '' . strip_tags (($comment->comment_content) . '') . ' ';} } |
|
其实这个$output就是输出html代码,所以可以在此根据自己的需要作出修改。
deepin20怎么新增字体? deepin20安装字体的教程
Linux如何给文件权限? linux给文件添加可执行权限的技巧
deepin20桌面图标样式怎么修改? deepin更换图标主题的技巧
virtualbox打不开虚拟机怎么办? linux无法访问virtualbox的解决办法
deepin怎么注销系统? deepin系统注销与切换用户的方法
Manjaro linux怎么调鼠标速度? Manjaro鼠标设置光标速度的技巧