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?
(@evo252)
11 years ago
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:
Do you know why these both two functions are not working?
Thanks!