Title: Block cookie comment_author_
Last modified: May 7, 2018

---

# Block cookie comment_author_

 *  Resolved [gokushan](https://wordpress.org/support/users/gokushan/)
 * (@gokushan)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/block-cookie-comment_author_/)
 * Hi
 * I have downloaded your plugin and it works fine for me. I get to block Google
   analitycs cookies like _ga, _gid and _gat when user want to do it. Now, i want
   to block the cookies coment_author, comment_author_email, comment_author_url 
   when the user so wishes but i don´t know how do this.
 * I don´t find information about where i have to apply the below instructions
 * [https://gdpr-wp.com/knowledge-base/enabling-or-disabling-functionality-based-on-consent-and-cookies/](https://gdpr-wp.com/knowledge-base/enabling-or-disabling-functionality-based-on-consent-and-cookies/)
 * I don´t know how to disable this cookie neither jetpack_comments_subscribe which
   is very similar. Have anyone the same issue and know how do it?
 * I understand how to do it when you know how to disable the cookie but in these
   two cases i don´t know how disable both cookies. I have to use this code
 *  if ( ! has_consent( ‘cookie_name’ ) || ! is_allowed_cookie( ‘cookie_name’ ) )
 * Thanks in advance
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fblock-cookie-comment_author_%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Fernando Claussen](https://wordpress.org/support/users/fclaussen/)
 * (@fclaussen)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/block-cookie-comment_author_/#post-10255579)
 * Hi [@gokushan](https://wordpress.org/support/users/gokushan/),
 * For WordPress comments, you would use the WordPress hook.
 * `remove_action( 'set_comment_cookies', 'wp_set_comment_cookies' );`
 *  Thread Starter [gokushan](https://wordpress.org/support/users/gokushan/)
 * (@gokushan)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/block-cookie-comment_author_/#post-10257152)
 * Ok. Thanks. I have added this code to my functions.php and it works fine
 *  if ( ! is_allowed_cookie( ‘comment_author’ ) ) {
    remove_action( ‘set_comment_cookies’,‘
   wp_set_comment_cookies’ ); }

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

The topic ‘Block cookie comment_author_’ is closed to new replies.

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

 * 2 replies
 * 2 participants
 * Last reply from: [gokushan](https://wordpress.org/support/users/gokushan/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/block-cookie-comment_author_/#post-10257152)
 * Status: resolved