如何在不安装插件情况下显示WordPress网站Cookie通知插图

In this article, we will show you how to display WordPress site cookie notifications without using any plug-ins.

because cookie collects users’ information and stores it for a period of time, EU Cookie law requires disclosure of cookie usage on your website. This is an EU directive that requires any website to obtain the consent of visitors before using its data.

it doesn’t matter whether your website is located in Europe, EU visitors may still be visiting it, so it becomes the object of EU Cookie law.

in addition, adding cookie notifications to your WordPress site does not cost a dime and is easy to implement! How

that adding unnecessary plug-ins to your WordPress site may slow down. Therefore, if possible, it is best to limit plug-in installation and manually adjust everything. To display WordPress cookie notifications in

, perform the following simple steps:

1. Generate cookie notification code by accessing WebsitePolicies.

2. Go to Configuration wizard and personalize the cookie notification template by adjusting its location, layout, color, and custom text.

如何在不安装插件情况下显示WordPress网站Cookie通知插图1

3. You can use the Click to preview option to preview the template you are creating.

4. When finished, press Copy code.如何在不安装插件情况下显示WordPress网站Cookie通知插图2

5. Log in to your WordPress dashboard and navigate to the appearance-& gt; theme editor.

6. Find the header.php file under Theme Files.

7. Open the file and paste the code under thetag.如何在不安装插件情况下显示WordPress网站Cookie通知插图3

8. Click Update File to save your changes.

if you want to check whether your settings are valid, just visit your website. Make sure your cookie notifications are displayed and working properly.

Tips: the cookie Builder website asks you to link to your own cookie or privacy policy. If you don’t already have it, you can generate it for free.

summary

you have it! Your website now complies with EU Cookie law, and you have learned how to display WordPress Cookie notifications only by pasting the generated code. This is a quick review:

  1. generates a free cookie notification code from WebsitePolicies.
  2. copies and pastes the code into the header.php file on WordPress.
Disclaimer: All articles on this website, unless otherwise specified or marked, are original and published on this website. Any individual or organization is prohibited from copying, stealing, collecting, or publishing the content of this site to any website, book, or other media platform without the consent of this site. If the content on this website infringes on the legitimate rights and interests of the original author, you can contact us for assistance.