Skip to content

Shortcode

Konstantinos Pappas edited this page May 5, 2025 · 2 revisions

Cookies shortcode

The [pressidium_cookie_consent_cookies] shortcode displays a table listing all cookies under the specified category, making it easy for users to understand what cookies are being used on the site.

This shortcode is particularly useful for websites that have a distinct cookie policy page.

Using the Block Editor?

You could use the Pressidium Cookies Table block instead, learn more about it at the Pressidium Cookies Table block section of this wiki.

Getting started

  1. Add the [pressidium_cookie_consent_cookies] shortcode to the desired page or post.

  2. Specify the category of cookies you want to display in the table by adding the category attribute to the shortcode. For example:

    [pressidium_cookie_consent_cookies category="necessary"]
    
  3. Publish or update the page.

Shortcode attributes

The [pressidium_cookie_consent_cookies] shortcode accepts the following attributes:

  • category (required): The category of cookies you want to display in the table. Possible values are necessary, analytics, targeting, and preferences.

    [pressidium_cookie_consent_cookies category="analytics"]
    
  • show_columns (optional): The columns you want to display in the table. Possible values are name, domain, expiration, path, and description. You can specify multiple columns separated by a comma. For example:

    [pressidium_cookie_consent_cookies category="targeting" show_columns="name,description"]
    

Styling the table

The table generated by the [pressidium_cookie_consent_cookies] shortcode is wrapped in a div element with the pressidium-cookie-consent-cookies class. You can use this class to style the table using CSS.

Out of the box, the table has a simple layout with minimal styling. You can customize the appearance of the table by adding custom CSS to your theme.

Clone this wiki locally