【问题标题】:Wordpress comment_form() problemsWordpress comment_form() 问题
【发布时间】:2013-04-03 16:13:52
【问题描述】:

我有一个包含此代码的 cmets.php 文件

$fields =  array(
  'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) .    '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
  '<input id="author" name="author" type="text" value="' . esc_attr(  $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
  'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
  '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
  'url'    => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' .
  '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
);

$comments_args = array(
  'fields' =>  $fields
);

comment_form($comments_args);

然后我将它包含在这个中:

get_template_part('comments');

但是显示的评论表单是这样的:

根本不是我想要的,我的表单在哪里?

【问题讨论】:

    标签: wordpress forms blogs contact


    【解决方案1】:

    您已以管理员身份登录 - 尝试退出,看看会发生什么。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-23
      • 2012-07-05
      • 1970-01-01
      • 2012-06-03
      • 2021-08-26
      • 2010-12-25
      • 2016-10-21
      相关资源
      最近更新 更多