Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

Don’t remember commenters in cookies

WordPress stops saving the commenter’s name, email and website in cookies, and the “Save my name…” checkbox goes away. One less cookie to explain.

  • Type PHP
  • Runs Everywhere (runs as WordPress loads)
  • Category Comments
  • Tested with WordPress 7.1
PHP
<?php

remove_action( 'set_comment_cookies', 'wp_set_comment_cookies' );
add_filter(
	'comment_form_default_fields',
	static function ( $fields ) {
		unset( $fields['cookies'] );
		return $fields;
	}
);

In these packs

  • Comments: Fewer spam comments and more control: close old posts, set minimum and maximum lengths, a spam trap, no links.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.