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
- Selecting a cookie policy page
- Generating a new cookie policy page
- Adding the shortcode to an existing page
- Customizing shortcode heading levels
- Understanding the policy table structure
- Connecting your privacy policy page
- Setting the cookie policy page from WordPress Privacy settings
- Verifying your setup
- FAQ
- Conclusion
Prerequisites
Before you begin, make sure you have:
- WPConsent installed and activated (see our guide on installing WPConsent)
- Administrator access to your WordPress site
- At least 1 cookie category configured with cookies or services (see managing cookie categories, managing services, and managing cookies)
Selecting a cookie policy page
The Cookie Policy setting lives in the Cookies Configuration section on the Settings tab under WPConsent >> Settings.

To assign a page:
- Navigate to WPConsent >> Settings in your WordPress admin.
- Scroll down to the Cookie Policy row inside the Cookies Configuration section.
- 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.
- Select the page you want to use.
- 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.
Generating a new cookie policy page
If you don’t have a cookie policy page yet, WPConsent can create one for you.

When no page is selected in the dropdown, a Generate Cookie Policy Page button appears below it. To generate the page:
- Make sure the Cookie Policy dropdown is set to Choose Page (no page selected).
- Click the Generate Cookie Policy Page button.
- 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:
- Open the page in the WordPress editor.
- 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.
- Enter the following shortcode: [wpconsent_cookie_policy]
- 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:
| Attribute | Description | Default | Allowed values |
|---|---|---|---|
category_heading | HTML tag for category names | h2 | h2, h3, h4, h5, h6, div, span |
service_heading | HTML tag for service names | h3 | h2, 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:
| Column | Description |
|---|---|
| Name | The cookie identifier (cookie ID). |
| Description | A description of what the cookie does. |
| Duration | How 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.
Setting the cookie policy page from WordPress Privacy settings
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:
- Navigate to Settings >> Privacy in your WordPress admin.
- Look for the Cookie Policy Page section added by WPConsent.
- 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:
- Open your cookie policy page in a browser and confirm all expected categories are listed.
- Check that each category shows its description and a table of cookies.
- Verify that services appear under their respective categories with descriptions and “Learn more” links.
- Open the consent banner preferences panel and confirm the “Cookie Policy” accordion section links to your cookie policy page.
- 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
Why is my cookie policy page empty?
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.
Why doesn’t the preferences panel link to my cookie policy?
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.
Why isn’t my privacy policy link showing up?
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.
How do I change the column headers in the cookie table?
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.