矿石的理想

More Grand Times is walking toward us!

WordPress 获取评论函数

1.在模版中加入recent_comments.php文件,其代码如下:

comment_post_ID);
		$comm_link = get_comment_link($comment->comment_ID);
		$comm_comm_temp = get_comment($comment->comment_ID,ARRAY_A);
		$comm_content = $comm_comm_temp['comment_content'];
?>
  • comment_author)?> On: Say:
  • 2.然后在sidebar.php你想要显示的位置中插入:

    
    
    posted by X-Ore in WordPress,网络编程 and have Comments (4)