Support » Fixing WordPress » How to disable comment cookies?

  • Hi,

    I’m trying to completely disable cookies on comments form of my WordPress blog, and added this function to functions.php file of my theme:

    remove_action( 'set_comment_cookies', 'wp_set_comment_cookies' );

    However, the cookies have not been removed because comments form still keep name/e-mail/url when I leave a test comment as a logged out user. Is there something wrong with this line of code?

    Then, I tried this but it doesn’t work too:

    add_filter('comment_cookie_lifetime', 'my_comment_cookie_lifetime');
    function my_comment_cookie_lifetime($lifetime) {
    return 3600;

    Do you know why these both two functions are not working?


Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to disable comment cookies?’ is closed to new replies.