Title: Remove fields in the comment section
Last modified: August 21, 2016

---

# Remove fields in the comment section

 *  Resolved [desmenschenwerk](https://wordpress.org/support/users/desmenschenwerk/)
 * (@desmenschenwerk)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/remove-fields-in-the-comment-section/)
 * I’m using a Child Theme of the Ignite Plus Theme. Now I want to remove the “Email”
   an the “URL” field in the comment section. I tried adding the following function
   to the function.php of the Child Theme but it doesn’t fits.
 *     ```
       function my_fields($fields) {
         $fields['email'] = '';
         $fields['url'] = '';
         return $fields;
       }
       add_filter('comment_form_default_fields','my_fields');
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Theme Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/remove-fields-in-the-comment-section/#post-5093114)
 * You almost had it! You just need to add the following parameter to the filter:
 * `add_filter('comment_form_default_fields','my_fields', 99);`
 * What’s happening is that the child theme’s function needs to override the parent
   theme’s. However, the child theme’s functions.php file always gets called before
   the parent theme’s functions.php, so the parent theme’s function immediately 
   overrides the child theme’s.
 * That’s why the ’99’ parameter is added to the filter – to make sure it’s called
   afterwards.
 * Also, make sure to turn off the name and email requirement in Settings > Discussion
   or no one will be able to successfully comment.
 *  Thread Starter [desmenschenwerk](https://wordpress.org/support/users/desmenschenwerk/)
 * (@desmenschenwerk)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/remove-fields-in-the-comment-section/#post-5093122)
 * Thank you. Adding the ’99’ to the code resolved the problem.
 *  Theme Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/remove-fields-in-the-comment-section/#post-5093138)
 * You’re welcome! Glad it worked for you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Remove fields in the comment section’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/ignite/1.84/screenshot.png)
 * Ignite
 * [Support Threads](https://wordpress.org/support/theme/ignite/)
 * [Active Topics](https://wordpress.org/support/theme/ignite/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/ignite/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/ignite/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/remove-fields-in-the-comment-section/#post-5093138)
 * Status: resolved