Tagged: comment form
Hello,
I hae used the following function in the past to remove the email and url fields in the comment form, but it is not working in the CB theme. How can I remove those fields?
‘function igmr_remove_comment_fields($fields) {
unset($fields[‘url’]);
unset($fields[’email’]);
return $fields;
}
add_filter(‘comment_form_default_fields’,’igmr_remove_comment_fields’, 50 );’- This topic was modified 5 years, 7 months ago by Brajesh Singh.
function igmr_remove_comment_fields($fields) { unset($fields['url']); unset($fields['email']); return $fields; } add_filter('comment_form_default_fields','igmr_remove_comment_fields', 50 );
Hi Jessica,
Please change thisadd_filter('comment_form_default_fields','igmr_remove_comment_fields', 50 );
to
add_filter('comment_form_fields','igmr_remove_comment_fields', 50 );
That will do it. Please make sure to uncheck the “Comment author must fill out name and email” in discussion settings to make the comments work.
Regards
Brajesh
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘ [Resolved] Unset fields in WordPress Comment Form’ is closed to new replies.
This topic is: resolved