WordPress Shortcodes for Legal Documents
Use Lawwwing shortcodes to insert your legal documents anywhere in WordPress: pages, posts, widgets, or template content.
This guide is focused on WordPress and assumes you already have the Lawwwing plugin installed and configured.
Overview
Supported document types:
notice- Legal Noticeprivacy- Privacy Policycookies- Cookie Policycookie-table- Cookie table or overviewterms- Terms and Conditionspurchase- Purchase Terms
The shortcode supports three rendering modes:
embed- renders the document inside aniframelink- renders a clickable linkinline- fetches the raw content and renders it directly on the page
- Use
embedfor simple integration and CSS isolation from your theme. - Use
inlineif you want the content to inherit your site styles. - Use
linkwhen you only need to link to the document.
Requirements
Before using shortcodes:
- Install and activate the Lawwwing plugin.
- Configure the Plugin ID in plugin settings.
If you do not configure the Plugin ID, the shortcode will not be able to resolve or render documents.
Basic shortcode
Use the generic shortcode:
[lawwwing_document type="notice"]
If you do not set mode, embed is used by default.
Required attribute
type
Accepted values:
noticeprivacycookiescookie-tabletermspurchase
cookie-tableThe cookie-table type is intended to render only the cookie table/overview, not the full legal document.
Rendering modes
1. Embed mode
This is the default mode. It renders the document inside an iframe.
[lawwwing_document type="privacy"]
Equivalent:
[lawwwing_document type="privacy" mode="embed"]
Example with custom height:
[lawwwing_document type="notice" mode="embed" height="1600"]
embedIdeal when you want a quick implementation and to minimize style conflicts with your theme.
2. Link mode
Renders a link to the document.
[lawwwing_document type="cookies" mode="link"]
Example with custom label:
[lawwwing_document type="purchase" mode="link" label="Read purchase terms"]
Example with custom target:
[lawwwing_document type="terms" mode="link" target="_self"]
linkUseful for legal menus, footers, or buttons that open the document on a separate page.
3. Inline mode
Fetches the raw version of the document and renders the content directly on the page.
[lawwwing_document type="notice" mode="inline"]
This mode requests the document URL using:
?raw=True
Use inline mode when you want legal text to be part of the page content instead of being displayed in an iframe.
Example:
[lawwwing_document type="privacy" mode="inline"]
In inline mode, content is injected into your DOM and may be affected by your theme CSS.
Available attributes
| Attribute | Required | Default | Description |
|---|---|---|---|
type | Yes | privacy | Document type to render |
mode | No | embed | Render mode: embed, link, or inline |
label | No | Document default label | Link text in link mode |
class | No | lawwwing-document-link | Extra CSS class or classes |
target | No | _blank | Link target in link mode |
height | No | 1200 | Iframe height in embed mode |
title | No | Document label | Iframe title in embed mode |
debug | No | 0 | Shows visible debug information for admins when set to 1 or true |
The class attribute is especially useful in inline mode to apply custom styles to legal content.
Examples
-
Render
Legal Noticein an iframe
[lawwwing_document type="notice"]
-
Render
Privacy Policyas a link
[lawwwing_document type="privacy" mode="link"]
-
Render
Cookie Policywith custom text
[lawwwing_document type="cookies" mode="link" label="View cookie policy"]
-
Render only the cookie table
[lawwwing_document type="cookie-table"]
-
Render the cookie table in inline mode
[lawwwing_document type="cookie-table" mode="inline"]
-
Render the cookie table as a link
[lawwwing_document type="cookie-table" mode="link" label="Cookie table"]
-
Render
Termsin inline mode
[lawwwing_document type="terms" mode="inline"]
-
Render
Purchase Termsin inline mode with custom class
[lawwwing_document type="purchase" mode="inline" class="legal-content legal-content--purchase"]
-
Render an iframe with custom height
[lawwwing_document type="notice" mode="embed" height="1800"]
-
Debug a missing document
[lawwwing_document type="purchase" mode="inline" debug="1"]
Direct shortcodes
In addition to the generic shortcode, the plugin also registers direct shortcodes for each document type.
Available direct shortcodes:
[lawwwing_notice][lawwwing_privacy][lawwwing_cookies][lawwwing_cookie-table][lawwwing_terms][lawwwing_purchase]
These shortcodes accept the same optional attributes as the generic shortcode.
Examples:
[lawwwing_notice]
[lawwwing_privacy mode="link"]
[lawwwing_purchase mode="inline"]
[lawwwing_cookie-table]
Direct shortcodes ([lawwwing_notice], [lawwwing_privacy], etc.) are equivalent to the generic shortcode with a predefined type.
Language handling
The plugin automatically selects the document variant using the current WordPress language.
Examples:
es_ES->esen_US->en
If a document is not available in the current language, the plugin falls back to the first available language configured in Lawwwing.
Language is resolved automatically based on WordPress locale (for example, es_ES or en_US).
Debug
If a document does not appear, use:
[lawwwing_document type="notice" debug="1"]
Or:
[lawwwing_document type="purchase" mode="inline" debug="1"]
For admin users, the shortcode can display debug information such as:
- Plugin ID
- site language
- available resolved document types
- raw inline URL when inline rendering fails
This is useful to verify whether the issue is:
- missing Plugin ID
- incorrect environment host
- missing language variant
- inline raw endpoint returning empty content
Start debugging with a minimal shortcode and debug="1", then add extra attributes.
Recommended usage
Use embed when:
- you want simple integration
- the remote document already has its own layout
- you want isolation from your theme CSS
Use inline when:
- you want legal text to be part of the page
- you want the content to inherit your site layout
Use link when:
- you only want a button or text link
- the document should open separately
- you are building legal navigation menus or footer links
Quick reference
Generic shortcode
[lawwwing_document type="notice"]
[lawwwing_document type="privacy" mode="link"]
[lawwwing_document type="cookies" mode="embed" height="1400"]
[lawwwing_document type="cookie-table"]
[lawwwing_document type="cookie-table" mode="inline"]
[lawwwing_document type="cookie-table" mode="link" label="Cookie table"]
[lawwwing_document type="terms" mode="inline"]
[lawwwing_document type="purchase" mode="inline" debug="1"]
Direct shortcodes
[lawwwing_notice]
[lawwwing_privacy]
[lawwwing_cookies]
[lawwwing_cookie-table]
[lawwwing_terms]
[lawwwing_purchase]
If you need help with manual legal document implementation, check Implementing Legal Documents.