Complianz Privacy Suite

Adding filters with MU Plugins. Quick & Easy

Aert Hulsebos

Aert Hulsebos

Categories

Popular articles

TCF for WordPress

The Transparency Consent Framework () is an initiative by IAB Europe and IAB Tech Lab to provide a platform for vendors, publishers, and consent management

Read More

TCF V2.0 release (Update)

Update: Released on October 5th 2020 Since August 15th the Transparency and Consent Framework V2.0 from IAB Europe or V2 has been adapted by Google

Read More
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

You might want to change your Cookie Banner Read more URL or have your placeholders when using Complianz. To edit some features of Complianz, you will need to apply some extra code to your WordPress installation. Below we will explain how you can use so-called Must-Use plugins to apply these filters.

Do you want to know which functionalities you can add to Complianz? Visit our overview of the features and code snippets.

What are mu-plugins?

Must-Use plugins, in short, is a folder in WP-Content called ‘mu-plugins’ which is a collection of files which are activated by default and cannot be deactivated in your WordPress dashboard. These files will stay put and activated even if you’re updating your WordPress installation or theme. Filters can also be implemented in your functions.php, but this would mean that your theme can not be updated anymore, unless using a child-theme.

If you don’t have a mu-plugins folder in wp-content, you can simply open your FTP client, then add the folder under the wp-content directory. The result should look like */wp-content/mu-plugins/

How to implement filters with Must-Use plugins.

  1. Find the required code in our hooks and filters overview
  2. Open your favorite text editor, start the file with <?php  
  3. Copy and paste the code and change the variables as described in our article. 
  4. After editing the filter, save your file ending with .php. For example myfilter.php Tip: use a descriptive file name so you can remember the function of a particular mu-plugin.
  5. Upload myfilter.php to wp-content/mu-plugins/ via FTP
  6. Check your site if the plugin has the desired functionality. For some filters it might be neccesary to clear your cache and test in a private/incognito browser window when testing. If any errors appear, you can simply delete the file from the mu-plugins folder.

 That’s it!


Recent articles

Subscribe