我想修改已登录用户和未登录用户的评论表单。
我通过更改注释修改了未登录用户的表单。php,但我不太确定如何为登录用户修改我的表单。我知道我必须使用comments\\u template(),但每当我尝试在页面中使用它时。php,我遇到这样的错误
Notice: Undefined variable: args in {PATH}/twwr-theme/comments-template.php on line 13
这些是我评论的内容。php,有点乱
<?php
if (!empty($_SERVER[\'SCRIPT_FILENAME\']) && \'comments.php\' == basename($_SERVER[\'SCRIPT_FILENAME\']))
die (\'Please do not load this page directly. Thanks!\');
if ( post_password_required() ) {
echo "This post is password protected. Enter the password to view comments.";
return;
}
?>
<h3><?php comments_number(\'No Comments\', \'One Comment\', \'Comments\' );?></h3>
<div class="navigation">
<div class="next-posts"><?php previous_comments_link() ?></div>
<div class="prev-posts"><?php next_comments_link() ?></div>
</div>
<ul class="commentlist">
<?php //comment layout is in functions.php ?>
<?php wp_list_comments(\'callback=comment_layout\'); ?>
</ul>
<div class="navigation">
<div class="next-posts"><?php previous_comments_link() ?></div>
<div class="prev-posts"><?php next_comments_link() ?></div>
</div>
<?php if ( comments_open() ) : ?>
<!-- If comments are open, but there are no comments. -->
<?php else : // comments are closed ?>
<p>Comments are closed.</p>
<?php endif; ?>
ID);?>