Complianz Privacy Suite

Wrapping content in consent shortcodes

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
We have made numerous integrations with popular services and plugins to control consent automatically and add placeholders when necessary. In some cases, you might want to use shortcodes instead to wrap your content. There are a few things to consider;
  • Caching the consent area is not possible.
  • The shortcodes come with a placeholder text. You can use CSS to design the placeholder to your needs. Below you will find examples.
  • You will need to manually add these wrappers in HTML.
  • A page reload is necessary to trigger the content in your consent area.
If you need an integration with a service or plugin, please log a support ticket. If the plugin is actively supported and has a decent following, we will integrate if needed, or write an article on how to use the script center for this purpose.

The shortcode

Below you will find the shortcode wrapper. The first opening shortcode should be wrapped in brackets [shortcode], the closing shortcode should be wrapped in [/shortcode]
cmplz-consent-area  text="Enable this content by clicking this link"

/* add your snippet or iFrame that needs to be blocked before consent */

/cmplz-consent-area
(These shortcodes are available from 4.6.11)

An example with styling

Hello! Please revoke your cookie settings to see a placeholder

Used CSS for this placeholder


/* Styling for Consent Area Placeholder - Icon by Flaticons (Free) */
.cmplz-consent-area {
	-moz-border-radius: 1px;
     -webkit-border-radius: 1px;
     background-color: #f0f7fb;
     background-image: url("your-image-address-here");
     background-position: 9px 11px;
     background-repeat: no-repeat;
     border: solid 1px #3498db;
     border-radius: 5px;
     line-height: 18px;
     overflow: hidden;
     padding: 15px 60px;
	width:95%;
}
.cmplz-consent-area a{
	color: #3498db;
	font-size: 14px;
	text-decoration:none;
}
You can download, and customize the cookie flaticon here.

Recent articles

Subscribe