WPConsent Documentation

Documentation, Reference Materials, and Tutorials for WPConsent

Cookie Policy Page

How do you create a cookie policy page that automatically lists every cookie your site uses? WPConsent provides a shortcode and a page generator that build a structured cookie table from your configured categories, services, and cookies. The cookie policy page ties into your consent banner so visitors can easily find full details about the data your site collects.

Table of contents

Prerequisites

Before you begin, make sure you have:

The Cookie Policy setting lives in the Cookies Configuration section on the Settings tab under WPConsent >> Settings.

The Cookie Policy page selector in the Settings tab

To assign a page:

  1. Navigate to WPConsent >> Settings in your WordPress admin.
  2. Scroll down to the Cookie Policy row inside the Cookies Configuration section.
  3. Use the Cookie Policy dropdown to search for a page. The dropdown supports live search, so you can type a page title to filter results.
  4. Select the page you want to use.
  5. Click Save Changes.

After you select a page, a View Page link appears next to the dropdown. This link opens the page in a new tab so you can quickly review the content.

Make sure the page you select contains the [wpconsent_cookie_policy] shortcode. This shortcode is required for automatically listing all cookie information configured in WPConsent.

If you don’t have a cookie policy page yet, WPConsent can create one for you.

The Generate Cookie Policy Page button

When no page is selected in the dropdown, a Generate Cookie Policy Page button appears below it. To generate the page:

  1. Make sure the Cookie Policy dropdown is set to Choose Page (no page selected).
  2. Click the Generate Cookie Policy Page button.
  3. WPConsent creates a new published page titled “Cookie Policy.”

The generated page includes:

  • A default introductory paragraph explaining how the site uses cookies.
  • A link to your WordPress privacy policy page (if one is set in Settings >> Privacy).
  • The [wpconsent_cookie_policy] shortcode, which outputs the cookie table.

WPConsent automatically selects the new page in the dropdown after generation. Review the page and customize the introductory text to match your site’s tone and legal requirements.

Adding the shortcode to an existing page

If you selected an existing page instead of generating one, you need to add the shortcode manually.

To add the shortcode:

  1. Open the page in the WordPress editor.
  2. Place a Shortcode block (in the block editor) or paste the shortcode directly (in the classic editor) where you want the cookie table to appear.
  3. Enter the following shortcode: [wpconsent_cookie_policy]
  4. Save or update the page.

The shortcode outputs a structured list of all cookie categories, their descriptions, services within each category, and a table of cookies for each.

Customizing shortcode heading levels

The shortcode accepts 2 optional attributes that control the HTML heading tags in the output:

AttributeDescriptionDefaultAllowed values
category_headingHTML tag for category namesh2h2, h3, h4, h5, h6, div, span
service_headingHTML tag for service namesh3h2, h3, h4, h5, h6, div, span

If your cookie policy page already uses h2 for its own headings, you may want smaller headings for the shortcode output:

[[wpconsent_cookie_policy category_heading="h3" service_heading="h4"]]

Understanding the policy table structure

The [wpconsent_cookie_policy] shortcode outputs cookie data in a hierarchical structure grouped by category.

Categories

Each cookie category appears as a heading (default h2) followed by its description. Categories with no cookies or services are skipped entirely.

Cookies assigned directly to a category

If any cookies belong directly to a category (not through a service), they appear in a table immediately below the category description. The table has 3 columns:

ColumnDescription
NameThe cookie identifier (cookie ID).
DescriptionA description of what the cookie does.
DurationHow long the cookie stays on the visitor’s device.

The column headers use the same translatable labels as the banner’s cookie table. You can customize these labels on the Content tab of the banner design page under the cookie table header fields.

Services within a category

After category-level cookies, each service within the category appears as a sub-heading (default h3) followed by:

  • The service description
  • A Learn more link to the service URL (if one is configured)
  • A table of cookies belonging to that service, using the same 3-column format

Example output structure

The rendered output follows this hierarchy:

[Category Name - h2]
  [Category description]
  [Cookie table - cookies directly under the category]

  [Service Name - h3]
    [Service description]
    [Learn more link]
    [Cookie table - cookies under this service]

  [Another Service - h3]
    ...

[Another Category - h2]
  ...

Connecting your privacy policy page

WPConsent doesn’t have its own privacy policy setting. Instead, it reads the standard WordPress privacy policy page configured under Settings >> Privacy in your WordPress admin.

When you set a cookie policy page in WPConsent, the preferences panel in the consent banner shows a “Cookie Policy” accordion section. This section displays links to both:

  • Your cookie policy page (set in WPConsent)
  • Your privacy policy page (set in WordPress core under Settings >> Privacy)

If no WordPress privacy policy page is configured, only the cookie policy link appears.

You can customize the text in this section using the Cookie Policy Text field on the banner content page. The default text uses {cookie_policy} and {privacy_policy} placeholders, which WPConsent replaces with links to the respective pages.

WPConsent also adds a Cookie Policy Page selector on the WordPress Settings >> Privacy page. This gives you an alternative location to assign the same cookie policy page without navigating to the WPConsent settings.

To use this option:

  1. Navigate to Settings >> Privacy in your WordPress admin.
  2. Look for the Cookie Policy Page section added by WPConsent.
  3. Select a page and click Use This Page.

The selection syncs with the Cookie Policy setting in WPConsent >> Settings, so both locations always reflect the same page.

Verifying your setup

After configuring your cookie policy page, verify everything works correctly:

  1. Open your cookie policy page in a browser and confirm all expected categories are listed.
  2. Check that each category shows its description and a table of cookies.
  3. Verify that services appear under their respective categories with descriptions and “Learn more” links.
  4. Open the consent banner preferences panel and confirm the “Cookie Policy” accordion section links to your cookie policy page.
  5. If you have a WordPress privacy policy page configured, confirm it also appears as a link in the preferences panel.

If the cookie policy page is empty, make sure you added the [wpconsent_cookie_policy] shortcode and configured at least 1 cookie category with cookies or services in WPConsent >> Settings >> Cookies.

FAQ

The page needs 2 things: the [wpconsent_cookie_policy] shortcode in the page content, and at least 1 cookie category with cookies or services configured in WPConsent. Categories with no cookies are not displayed.

The “Cookie Policy” accordion section only appears when a page is selected in the Cookie Policy dropdown under WPConsent >> Settings. Confirm a page is assigned and save your changes.

WPConsent reads the privacy policy page from WordPress core settings. Navigate to Settings >> Privacy in your WordPress admin and make sure a privacy policy page is selected.

The shortcode uses the same cookie table header labels as the preferences panel. To customize them, go to the Content tab on the banner design page and update the Name Header, Description Header, and Duration Header fields.

Can I use the shortcode on multiple pages?

Yes. The [wpconsent_cookie_policy] shortcode works on any page or post. However, only the page selected in the Cookie Policy dropdown is linked from the consent banner’s preferences panel.

Conclusion

Your cookie policy page gives visitors a complete picture of how your site uses cookies. With the [wpconsent_cookie_policy] shortcode, the table stays in sync with your WPConsent configuration automatically. Combined with the preferences panel link and privacy policy integration, it provides a transparent and accessible experience for your visitors.

To learn how to customize the text and links that appear in the banner’s preferences panel, read our guide on banner content and text.

Was this article helpful?

Related Articles