再会。我最近试图弄清楚在评论框中添加自定义字段它工作正常。我仍然需要知道如何在评论框后添加自定义字段。我不知道该怎么做。
add_filter('comment_form_defaults', 'change_comment_form_defaults');
function change_comment_form_defaults($default) {
$commenter = wp_get_current_commenter();
$default['fields']['comment'] .= '<p class="comment-form-author">' .
'
<input type="checkbox" style="margin:0px;height:auto;width:auto; position:relative;" name="privacy" value="1"/> I agree to the Terms of Use and Privacy Policy</p>';
return $default;
}
当我尝试上面的代码时,这种方式本身就出现了。
我如何才能在评论框旁边显示此字段。任何建议都会很棒。
编辑:
谢谢,维基