dounei5721 2010-12-13 20:33
浏览 17
已采纳

如何制作所需的wordpress评论字段?

Here is my form:

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform" class="validate">  
   <?php if($user_ID) : ?>  
   <?php else : ?>
   <div class="label_container">
      <div class="left">
         <label for="author" class="label label_name">Name*</label>                 
      </div>
      <div class="right">
         <label for="email" class="label label_email">Email*</label>              
      </div>
      </div>
   <div class="input_container">
      <input id="name" name="author" class="required input_text input_name" type="text" value="" /> 
      <input id="email" name="email" class="required input_text email input_email" type="text" value="" />
   </div>         
   <?php endif; ?>
      <div class="label_container"> 
         <label for="comment" class="label label_comment">Comment</label>                 
      </div>
   <textarea id="comment_box" class="required input_comment" name="comment" cols="40" rows="6"></textarea>   
   <p><input name="submit" class="input_submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />  
   <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p>  
   <input type="hidden" id="redirect_to" name="redirect_to" value="<?php echo get_bloginfo('wpurl');?>/comment">
   <?php do_action('comment_form', $post->ID); ?>  
</form>

I have required fields on all inputs, but it is only working on the comment text field.

Any ideas?

  • 写回答

2条回答 默认 最新

  • dongwujie7477 2010-12-14 09:20
    关注

    you can actually control that from the settings discussion tab in the wp-admin panel.

    make sure to check Comment author must fill out name and e-mail. that should do it.

    is this what you are looking for?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)