我有以下代码可以获取我网站中的最后评论:
function bg_recent_comments($no_comments = 30, $comment_len = 80, $avatar_size = 48) {
$comments_query = new WP_Comment_Query();
$comments = $comments_query->query( array( \'number\' => $no_comments , \'status\' => \'approve\') );
$comm = \'\';
if ( $comments ) : foreach ( $comments as $comment ) :
$comm .= \'<li id="comment-160546">
<br><a href="\'.get_permalink($comment->comment_post_ID).\'" style="font-family:droid arabic kufi;text-align: center;font-style: italic;font-weight: bold;font-size: 15px;">\'.get_the_title($comment->comment_post_ID).\'</a><br><br>
<div class="comment byuser comment-author-hasan-ly odd alt thread-odd thread-alt depth-1 comment-wrap">
<div class="comment-avatar">\'.get_avatar( $comment->comment_author_email, $avatar_size ).\'</div>
<div class="comment-content">
<div class="author-comment">
<cite class="fn">\'.get_comment_author( $comment->comment_ID ).\'</cite>
<div class="comment-meta commentmetadata"><a href="\' . get_permalink( $comment->comment_post_ID ) . \'#comment-\' . $comment->comment_ID . \'">Post URL</a></div><!-- .comment-meta .commentmetadata -->
<div class="clear"></div>
</div>
<p>\' . $comment->comment_content . \'</p>
</div>
</div><!-- #comment-## --><br>
</li>\';
endforeach; else :
$comm .= \'No comments.\';
endif;
echo $comm;
}
现在我的问题是什么时候添加
comment_reply_link
任何用户都可以重播此评论。现在显示表单回复,
当var\\u转储时comment_reply_link
它返回空值。
如何解决它