Currently GDPR (General Data Protection Regulation) is being rife in the Internet. As of May 25, the EU government has ordered that all websites accessed from Europe should include the standard of the Privacy Policy. One of many ways is to display the Cookie Consent site on the page.

This tutorial explains how to display Cookie Consent into a website that uses WordPress CMS (Content Management System) without using plugins.

Step 1: Create a Cookie Consent Notification Widget

  • Then in Choose theme select the theme of the notification display as you like. Afterwards, click Continue.

  • In Customise, you can change the text you want to display by checking Customise the text. In Headline text to change the text you want to display. Accept button text to change the text in the notification button. Read more button text to change the text shown for the link to Privacy Policy page that has been created.
    • In the latest WordPress (when writing this tutorial, the latest version is 4.9.6) is already equipped with a template of Privacy Policy page.
    • How to create the page, click Settings > Privacy.
    • If there is already a draft, just click Use This Page.
    • If it’s not already there, click Create New Page.
  • If it’s okay, then go ahead by installing a link from the page Privacy Policy in Your cookie policy. Once filled in the link, click Continue.
  • Save the generated code in Copy the code.

Step 2: Website Integration

  • Some WordPress themes provide Custom Code in Dashboard > Appearance > Customize. Paste the saved code in the Header section.
  • If the theme does not provide Custom Code, you have to manually install it in Editor, Dashboard > Appearance > Editor. It is recommended to create Child Theme first (https://codex.wordpress.org/Child_Themes). So that when the theme is updated, this widget is still saved.
  • Find header.php file. Then paste the code before </head>. Afterwards, click Update File.

Done! Please check on your website, whether the notification already appears or not? Congratulations you have successfully installed a notification for Cookie Consent on your website.

Update: For more complete customization you can use this tool: https://cookieconsent.insites.com