admin管理员组文章数量:1289543
To fulfil the GDPR policy, I want to add a consent checkbox under the "Post Comment" section.
I have followed the WpBeginner tutorial and put the following code in my Comment.php
file
// Now we will add our new privacy checkbox optin
'cookies' => '<p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' .
'<label for="wp-comment-cookies-consent">' . __( 'Save my name, email, and website in this browser for the next time I comment.' ) . '</label></p>',
Questions:
The above code is putting a checkbox but I am not sure if its really doing the required thing (not storing data if unchecked).
The checkbox is not placed correctly as shown in the screenshot below. How can I change the position to put it in the correct place?
PS: I am using Activello theme.
To fulfil the GDPR policy, I want to add a consent checkbox under the "Post Comment" section.
I have followed the WpBeginner tutorial and put the following code in my Comment.php
file
// Now we will add our new privacy checkbox optin
'cookies' => '<p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' .
'<label for="wp-comment-cookies-consent">' . __( 'Save my name, email, and website in this browser for the next time I comment.' ) . '</label></p>',
Questions:
The above code is putting a checkbox but I am not sure if its really doing the required thing (not storing data if unchecked).
The checkbox is not placed correctly as shown in the screenshot below. How can I change the position to put it in the correct place?
PS: I am using Activello theme.
Share Improve this question edited Aug 25, 2018 at 19:22 fuxia♦ 107k38 gold badges255 silver badges459 bronze badges asked Aug 25, 2018 at 18:55 skmskm 1251 silver badge9 bronze badges 1- It's part of WP since v4.9.6 – nmr Commented Aug 25, 2018 at 20:03
1 Answer
Reset to default 2The '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/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/plugins/simple-gdpr/ . It's not fancy, but will get the basics on your site if you are not EU based.
本文标签: How to add consent checkbox in comment section
版权声明:本文标题:How to add consent checkbox in comment section 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741432242a2378428.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论