最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
wordpress中首页文章下显示评论内容
时间:2022-06-25 19:16:46 编辑:袖梨 来源:一聚教程网
首页文章下面显示若干条的评论内容,包括作者头像、评论时间、评论内容等,没有直接回复的功能,具体代码如下:
代码如下 | 复制代码 |
$args = array( 'status' => 'approved', 'number' => '5', 'post_id' => get_the_ID() ); $comments = get_comments($args); foreach($comments as $comment) : echo( get_avatar($comment->comment_author_email,64) . $comment->comment_author . ' ' . $comment->comment_content ); endforeach; |
代码放在首页循环里就可以了。
相关文章
- 《夜族崛起》铁匠西里尔位置一览 05-17
- 《寓言之地》1.02更新内容一览 05-17
- 《辐射4》steam好评率介绍 05-17
- 《夜族崛起》技能强化珠宝掉落说明 05-17
- 《辐射4》主机控制台介绍 05-17
- 《星露谷物语》海草和绿藻获取方法 05-17