I want to add a field to the comments and have used these codes.
functions.php
function my_fields($fields) {
$fields['url2'] = '<p class="comment-form-url2">
<label for="url2">URL hittad på webben</label>
<input id="url2" name="url2" type="text" value="" size="30" />
</p>';
return $fields;
}
add_filter('comment_form_default_fields','my_fields');
comments.php
comment_form();
Questions
- It does not add an extra field in admin comment. Should it, or not?
- It does not seem to save the extra field. I tried to var dump the comment array. Why not?