Title: edit amp comments section
Last modified: March 19, 2020

---

# edit amp comments section

 *  Resolved [siberkaynak](https://wordpress.org/support/users/senturkkserkan/)
 * (@senturkkserkan)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/edit-amp-comments-section/)
 * function remove_comment_fields($fields) {
    unset($fields[‘url’]); unset($fields[’
   email’]); unset($fields[‘cookies’]); return $fields; } add_filter(‘comment_form_default_fields’,’
   remove_comment_fields’);
 * how do i add the above function code as amp?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fedit-amp-comments-section%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/edit-amp-comments-section/#post-12560081)
 * [@senturkkserkan](https://wordpress.org/support/users/senturkkserkan/) You can
   apply that function as you would normally to your themes functions.php file or
   preferably a custom plugin. It will apply to both AMP and non AMP.
 * If you are looking to apply that filter to AMP URLs only you can include the `
   is_amp_endpoint` function.
 *     ```
       function disable_fields($fields) { 
           if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
       	unset($fields['1']);
       	unset($fields['email']);
       	unset($fields['cookies']);
       	  }
           return $fields;
       }
       add_filter('comment_form_default_fields','disable_fields');
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘edit amp comments section’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

## Tags

 * [AMP Plugin](https://wordpress.org/support/topic-tag/amp-plugin/)
 * [function](https://wordpress.org/support/topic-tag/function/)

 * 1 reply
 * 2 participants
 * Last reply from: [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/edit-amp-comments-section/#post-12560081)
 * Status: resolved