当前位置:网站首页>How to add cookie pop-up window in WordPress website (without plug-in)

How to add cookie pop-up window in WordPress website (without plug-in)

2022-06-11 02:38:00 Know blog

 How to be in WordPress Add to site Cookie Pop-up window

How to be in WordPress Add to site Cookie Pop-up window

   If you are using WordPress Station building Users of , Then it's possible that your website is already using Cookie To collect visitor data , If you don't show any consent on the website Cookie The notice of , You may be fined heavily or you may have to deal with serious problems .

 How to be in WordPress Add to site Cookie Pop-up window

   Don't worry about . By displaying Cookie Consent notice can easily avoid problems , And it's easy to set them up . In this article , Know blog To give you a detailed description of how the inapplicable plug-ins WordPress Add to site Cookie Pop-up window .

Why do we need Cookie notice

   In short ,Cookie Is the file that your website stores in the visitor's browser , The following are used throughout the network Cookie Some common examples of :

  • Store login credentials , So that users don't have to re-enter them every time they visit your website
  • Remember visitors Browse recently Specific pages that have been ( That is, on the e-commerce website “ Recent products ”)
  • Pay attention to specific User behavior , For example, when they last visited your website

  Cookie Everywhere on the Internet , even to the extent that  Google Analytics  Also used Cookie To track visitors and collect their data , For example, device type 、 Visitor location 、 Operating system, etc . You may think these Cookie It's harmless , But one fact cannot be forgotten , You collect data from visitors without asking for the user's consent , This is the introduction of Cookie Reasons for agreeing to the notice .

Not applicable to plug-ins WordPress Website add Cookie notice

   towards WordPress Add plug-ins to the website May slow down . therefore , If possible , It's best to limit plug-in installation and manually adjust everything . To display the WordPress cookie notice , Please follow the simple steps below :

  1、 By visiting WebsitePolicies Generate cookie Notification code . Go to the configuration wizard section and adjust it Location 、 Layout 、 Color and its custom text To personalize cookie Notification template .

WebsitePolicies Medium adjustment WordPress cookie Notification template

  2、 You can use “Click to preview Click preview ” Option to preview the template you are creating .

  3、 After completion , Click on “Copy code”. Copy WebsitePolicies Medium WordPress cookie Notification code .

 Copy WebsitePolicies Medium WordPress cookie Notification code

  4、 Log in to your WordPress instrument panel And navigate to the “ appearance ”->“ Theme Editor ”. Find what you use Subtheme , find header.php file ( If not , You can copy the theme header.php To subtopics ).

  5、 Open the file and paste the code into <head> Under the mark .

 Paste the code into wordpress Website

  6、 Click update file to save the changes . If you want to check whether your settings are valid , Just visit your website . Make sure your cookie The notification is displayed and working properly .

   Be careful :Cookie The generator website will ask you to link to your own cookie/ Privacy policy . If you have not , Can be generated for free .

summary

   The above is not using plug-ins in WordPress Add to site Cookie Pop-up window , Now? , You have learned how to paste the generated code to display WordPress Cookie notice .Cookie It is one of many ways that modern websites can provide their users with a better experience , Use WordPress CMS Content management system , Personalize your website for each visitor .

   recommend : What is? WordPress?

   recommend : How to be in WordPress Add free online chat to the website -Chaty Plug in tutorial

 
原网站

版权声明
本文为[Know blog]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203020557047868.html