Skip to main content
Version: v1.9.2

WordPress Shortcodes for Legal Documents

Use Lawwwing shortcodes to insert your legal documents anywhere in WordPress: pages, posts, widgets, or template content.

info

This guide is focused on WordPress and assumes you already have the Lawwwing plugin installed and configured.


Overview

Supported document types:

  • notice - Legal Notice
  • privacy - Privacy Policy
  • cookies - Cookie Policy
  • cookie-table - Cookie table or overview
  • terms - Terms and Conditions
  • purchase - Purchase Terms

The shortcode supports three rendering modes:

  • embed - renders the document inside an iframe
  • link - renders a clickable link
  • inline - fetches the raw content and renders it directly on the page
Quick mode selection
  • Use embed for simple integration and CSS isolation from your theme.
  • Use inline if you want the content to inherit your site styles.
  • Use link when you only need to link to the document.

Requirements

Before using shortcodes:

  1. Install and activate the Lawwwing plugin.
  2. Configure the Plugin ID in plugin settings.
warning

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"]
info

If you do not set mode, embed is used by default.

Required attribute

  • type

Accepted values:

  • notice
  • privacy
  • cookies
  • cookie-table
  • terms
  • purchase
cookie-table

The 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"]
When to use embed

Ideal when you want a quick implementation and to minimize style conflicts with your theme.


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"]
When to use link

Useful 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"]
warning

In inline mode, content is injected into your DOM and may be affected by your theme CSS.


Available attributes

AttributeRequiredDefaultDescription
typeYesprivacyDocument type to render
modeNoembedRender mode: embed, link, or inline
labelNoDocument default labelLink text in link mode
classNolawwwing-document-linkExtra CSS class or classes
targetNo_blankLink target in link mode
heightNo1200Iframe height in embed mode
titleNoDocument labelIframe title in embed mode
debugNo0Shows visible debug information for admins when set to 1 or true
info

The class attribute is especially useful in inline mode to apply custom styles to legal content.


Examples

[lawwwing_document type="notice"]
[lawwwing_document type="privacy" mode="link"]
[lawwwing_document type="cookies" mode="link" label="View cookie policy"]
[lawwwing_document type="cookie-table"]
[lawwwing_document type="cookie-table" mode="inline"]
[lawwwing_document type="cookie-table" mode="link" label="Cookie table"]
  • Render Terms in inline mode

[lawwwing_document type="terms" mode="inline"]
  • Render Purchase Terms in 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]
note

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 -> es
  • en_US -> en

If a document is not available in the current language, the plugin falls back to the first available language configured in Lawwwing.

info

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
Recommendation

Start debugging with a minimal shortcode and debug="1", then add extra attributes.


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]
More information

If you need help with manual legal document implementation, check Implementing Legal Documents.