Redirect the “Read More” Link According to the Selected Language Using GDPR Cookie Consent Plugin

The GDPR Cookie Consent plugin helps you to make your website comply with the GDPR Cookie Law. The plugin displays a cookie notice bar that allows the users to accept or reject the cookies. The plugin also allows you to link the users to the Privacy Policy page using the Read More link.

Currently, the plugin allows you to provide the link to only a specific privacy policy page. For websites that are viewed in multiple languages, it is desirable that the link is redirected to the privacy policy page of the selected language. The below code snippet allows you to do just that. In the below code, replace the text for the $settings[‘button_x_text’] with the text for the “Read More” link in the selected language and add the URL to the page that the Read More link should redirect to within the ‘if’ condition.

Add the code snippet below to the function.php file of the active child theme to redirect the Read More link to different pages based on the selected language of the website.

5 thoughts on “Redirect the “Read More” Link According to the Selected Language Using GDPR Cookie Consent Plugin

  1. rpai
    rpai says:

    Can the GDPR CC banner and button text be localized? So, when viewing a /fr version of a site, the message and button labels are in French, a /de version, in German, a /en version, in English?

    • Mark
      Mark says:

      Hi,

      Translations for the message bar can be found under WPML > string translations for domain admin_texts_CookieLawInfo-0.9. Currently, you can translate the cookie message, Accept button, the Reject button, and the Privacy & Cookie Policy tab with the WPML plugin.

    • Safwana
      Safwana says:

      Hi,

      You can remove the plugin from your website by clicking on deactivate and then delete from the Installed Plugins page on your website. If in any case, removing the plugin is unsuccessful this way, you may delete the plugin folder from your server via FTP.

  2. frankieosullivan
    frankieosullivan says:

    Can you help me out, Cookie Consent Plugin only downloading as a File, I need a Zip file, if I change it to a Zip file it creates a fatal error on the site?

Leave a Reply

Your email address will not be published. Required fields are marked *