Home > Docs > Shortcodes used in GDPR Cookie Consent Plugin

Shortcodes used in GDPR Cookie Consent Plugin

Last updated on January 29, 2025

The GDPR Cookie Consent plugin creates a cookie notification bar on a WordPress website and obtains consent for the use of cookies. It uses shortcodes, simple codes that make it easy for website owners to add cookie consent banners and configure the banner settings. Understanding and utilizing these shortcodes effectively ensures a seamless user experience.

Shortcodes List

ShortcodeDescriptionScreenshot
[wcc_accept]This shortcode adds an Accept button that closes the header when clicked. It can be used on the cookie notification bar to obtain the user’s consent.
[wcc_preference_button]This shortcode will add a cookie settings link to the page, which, when clicked, opens the second layer of the banner.
[wcc_reject]This shortcode adds the Reject button. When clicked, the reject button records the user’s denial of the website’s use of cookies.
[wcc_privacy_link]This simple shortcode can be used to add the Read More link that can be linked to another URL or page on the website. This shortcode can provide a link that can be redirected to the website’s cookie policy page.
[wcc_cookies_audit_table]Since the website owner must inform users of the cookies used on the website, this simple shortcode can display all the cookies and their related details in a tabular format wherever the shortcode is added. You can add the shortcode to your cookie policy page to inform users of the cookies used on the website.
Cookie Audit Table
[wcc_category_list]This shortcode displays the cookies scanned by the plugin in a tabular format. The table lists the cookies according to the categories they belong to, as defined by the user.
Category Wise Listing of Cookies
[wcc_preference_category]This shortcode can display the popup that appears when the Customize button is clicked, wherever the shortcode is applied.
Preference Category

Steps to add shortcode

You can add shortcodes to WordPress posts, pages, and cookie notice messages. Follow the steps mentioned below to add the shortcodes to the required location.

  • To add a shortcode to a page or post, open the page or post where you want to add the shortcode, include the shortcode element, and type the required shortcode inside the shortcode element.
Shortcode added to a WordPress page
Shortcode added to a WordPress page
Cookie-list added to the frontend
Cookie-list added to the frontend
  • To add a shortcode to the cookie notice bar, navigate to Cookie consent > Cookie banner > Content & Colors> Cookie Notice. Inside the Message textbox, add the required shortcode.
Shortcode added to the cookie banner
Shortcode added to the cookie banner