After further research I found some relevant functions. Keep in mind it’s probably better to separate these into different functions, and if your WordPress theme gives you any trouble, check this out.
// disable url field
function disable_comment_url($fields) {
if(isset($fields['url']))
unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields', 'disable_comment_url');
// disable email field
function disable_comment_email($fields) {
if(isset($fields['email']))
unset($fields['email']);
return $fields;
}
add_filter('comment_form_default_fields', 'disable_comment_email');
Also be sure to visit Settings >> Discussion and uncheck the “Comment author must fill name and email” option to avoid user comments being rejected upon submission.
Related Posts:
- Removing the “Website” Field from Comments and Replies?
- How to remove website url field from comment form completely?
- Why do I get comment spam even with Akismet and Captcha?
- How to rearrange fields in comment_form()
- How to add a class to the comment submit button?
- How to wrap submit button of comment form with div
- comments reply script not working
- How to display comment form error messages in the same page
- How to deal with small scale comment spam on small commercial sites? [closed]
- What’s the easiest way to close comments on media/attachments?
- How to remove comment spam in WordPress
- How is comment spam received without a comments form?
- How do I set up real anonymous posting in bbpress forums? [closed]
- How to allow the reply link to remain on the comment form after I have reached my 10 nested comment limit?
- Deep customization of the comment form?
- Allow anonymous comments, but prevent spam [closed]
- Using filter to add additional fields to comment_form()
- Why are default comments deprecated?
- Comments Reply Form
- Does WordPress Allow Blank/Empty Comment Submissions In WordPress?
- Comment form not showing up without comments
- Is there any advantage to emptying comment spam?
- Programmatically block commenting by restricting view of comment form
- Why do I get email notifications about comments that WordPress has already determined are spam?
- How can comments be submitted when I don’t have a comment box on a page?
- Number of External Links in Comments – Moderation Option
- Custom Field Added In Comment Form Not Showing In Edit
- Comments screen in backend, how to disable Quick Edit | Edit | History | Spam | for non admins
- Add a drop down list to comment form?
- How To Remove The “Click here to cancel reply” Link From The WordPress Comment Form
- Making a Comment on a page without being on that page?
- customize comment form
- Strategies for coping with hyperagressive spambots?
- How to save new comment as custom comment type?
- WP comments form (custom) is displaying an extra comment field
- How to modify comments form using comment_form()?
- How to add consent checkbox in comment section
- How can I automatically delete comments that contain chinese / russian signs?
- How to add enctype to multipart/form-data to comment form?
- Comments view limited to 20 results – any way to increase to 50 or 100?
- Changing position of cancel_comment_reply_link and other elements of comment form
- Publish a message on facebook after having posted a comment
- Edit Comment_Field while using T5 Comment Textarea On Top-Plugin
- Report spam button
- Share comment to twitter after publishing [closed]
- Disable comments
- Bots posting comments on pages
- How to add attributes to the comment form tag?
- Comment form connection to Gravity Forms
- Auto-fill Custom comment fields
- The comment login form is visible to me but not to the user
- Change order of comment fields
- How to make a secure blog that is completely private?
- How to call my custom WordPress Comment form without getting the comments?
- Auto delete comment if Contains
- Create comments.php form of custom HTML code
- How can I test why the comment hook is not working?
- How can I convert anonymous commenters into registered users?
- comment_post action hook running on page load instead of after a comment is posted
- Add class to comment form div when comment-reply button is clicked
- To whom do emails get sent via the WordPress comments form?
- blank page after submitting a comment
- Display complete comment section via post ID
- Notification if Comment Author Field is left empty. E.g. change input border colour
- Assign author to comment from post edit page
- How to retain comment text on comment form after login/registration?
- All users/comments suspected as bot? [closed]
- Check if comment was successfully submited
- Spammers attacking my WordPress Site – Removing URL field from core? [closed]
- Ajax submit comments
- Why could my comment_form variable not be working?
- How to block comments and pings?
- Batch approve comments
- Display avatar with comment form?
- reCaptcha doesnt appear in comment (manual or plugin)
- How to make comments private for commentor and post author
- Name of comment field differs on different sites
- Make every comment go to the spam folder
- Anonymous spam comments when only registered users can comment
- comment_notes_before not working
- Add comment_meta to wp_comment_reply
- How to create post comment from different domain
- Get comment id of the individual comments in comment list when modifying comment posted using comment text filter
- How can I embed comments plugin to my own website?
- Custom comment field not showing when logged-in
- Comments on future posts
- get_comment_meta not behaving as expected
- unsetting required fields in the comment reply form
- Returning error upon comment being flagged as spam
- Clicking Comment “Reply” Button only replies to first comment
- How to filter comments by comment_meta
- WordPress comment processing . Default unapproved comments detection before posting
- Changing the Comment Fields using Filter (without success)
- Cannot Remove Title Reply from Custom Comment Template for Signup Page
- comment just attachment .. reply just text … can I do that?
- Custom sort comments with select form
- Edit Comments Fields
- Same comment section on every page
- Update post “A” on comment submition on post “B”
- Upload avatar for post comment