How to change the read more URL on the cookie banner

Please ask for support for assistance if it’s unclear.

Rogier

Rogier

Senior Developer

Categories

Most Popular Articles

Subscribe to our newsletter

    For EU Subscribers | Privacy Statement
    For USA Subcribers | Privacy Statement

  • This field is for validation purposes and should be left unchanged.

WordPress offers filter hooks to allow plugins to modify various types of internal data at runtime.

A plugin can modify data by binding a callback to a filter hook. When the filter is later applied, each bound callback is run in order of priority, and given the opportunity to modify a value by returning a new value.

Call the following function in your theme’s functions.php file. Replace the URL with your preferred result.

How to add filters you ask? Read this article to know more about filters and hooks.



/**
* Filter Cookie banner settings
* @param array $output
* @return array $output
*/
function cmplz_edit_cookie_settings($output){
$output['readmore_url'] = 'my-cookie-policy-url';
return $output;
}
add_filter('cmplz_cookie_settings', 'cmplz_edit_cookie_settings');

1 reply
  1. sergio camargo says:

    great plugin!
    I installed the plugin for a customer who uses polylang and thanks to this post I managed to make the cookie-banner completely functional.
    Thanks !! keep up

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.

© Copyright - Complianz 2019
×

Complianz Privacy Suite 3.1 is live!

See our new features and available documentation. Read more