打开主题正文模板文件single.php,找到类似的:
if ( comments_open() || get_comments_number() ) : comments_template(); endif;
修改为
if ( is_user_logged_in()){ if ( comments_open() || get_comments_number() ) : comments_template(); endif; }
其它主题方法类似,比如:
<?php if ( is_user_logged_in()){ ?> <?php if ( comments_open() || get_comments_number() ) : ?> <?php comments_template( '', true ); ?> <?php endif; ?> <?php } ?>