How to add consent checkbox in comment section

The ‘consent’ checkbox is already part of WP Core. See Settings, Discussion, for the “Show comments cookies opt-in checkbox”. Enable that, and your comments area will have a GDPR-type checkbox there.

There are also other Privacy/GDPR related options in the latest WP. Look under Settings, Privacy. Also look under the Tools menu for the Export/Erase Personal Data screens to take care of removing personal information.

You should also add the Privacy page to your menu/site. More info here: https://wordpress.org/news/2018/04/gdpr-compliance-tools-in-wordpress/ .

Note that there are tons of GDPR-related plugins. I made a simple one here: https://wordpress.org/plugins/simple-gdpr/ . It’s not fancy, but will get the basics on your site if you are not EU based.