Legal shortcodes

Use six shortcodes to insert the current site's saved legal details into pages, posts, widgets or builder fields that process WordPress shortcodes.

Before starting, complete the fields described in Legal and fiscal details and confirm that the target content supports shortcodes.

The shortcodes

Shortcode Prints
[company_name] The Fiscal name
[legal_address] The Fiscal address
[company_id] The NIF
[mercantile_register] The Mercantile register entry
[legal_email] The Email for legal issues
[web_domain] The site's own domain

The first five read the fields in Settings → General settings. [web_domain] reads the site's address, so it needs no configuration and follows the site if it moves.

Add the shortcodes

  1. Edit the page, post, widget or template field.
  2. Insert the needed shortcode in the sentence where its value should appear.
  3. Save or update the content.
  4. View the public page and read the rendered sentence.

For example:

[company_name], with tax number [company_id] and registered office at
[legal_address], operates the website [web_domain]. For legal matters,
write to [legal_email].

Each shortcode renders the current stored value. The shortcodes accept no attributes.

Why use them instead of typing

Because the same details appear on the legal notice, the privacy policy, the terms, the cookie policy and the footer — and because they change.

Typed by hand, a company move means finding and editing every occurrence, and missing one. With shortcodes, you change the field once.

Empty output

A shortcode whose field is empty prints nothing at all. It does not warn you, and it does not leave a placeholder.

That is easy to miss, and it produces sentences with holes in them:

…with tax number and registered office at …

Fill every field you reference, and read the finished page rather than trusting the source.

Common placements

Content Values it may need
Legal notice All of them
Privacy policy Name, NIF, address, legal email
Terms and conditions Name, NIF, address
Cookie policy Name, legal email
Footer Name, and sometimes the domain

The organization remains responsible for deciding which values and wording belong in each document.

Verify

  1. Fill all five fields and save.
  2. Open each page that uses the shortcodes.
  3. Read the rendered sentences, not the source, looking for gaps and doubled punctuation.
  4. Check the footer on a phone as well as a desktop.

Troubleshooting

  • The shortcode appears as text: the content field does not process shortcodes, or the shortcode is inside a code block. Move it to a shortcode-capable field.
  • Nothing appears: the corresponding setting is empty. [web_domain] is the exception because it reads the site's address.
  • The wrong value appears: check Settings → General settings in the same site's dashboard.
  • The email is not clickable: [legal_email] prints the address only. Add the surrounding link with a block, builder control or supported markup.
  • A move left an old domain: confirm the WordPress site address was updated correctly; [web_domain] follows that site address.

Limitations

  • No attributes. Each shortcode prints one value, as stored.
  • No formatting. Wrap them in your own markup if you need bold or a link.
  • They print the values for the site they run on, so a multisite network's sites each show their own.
  • They do not validate whether the information or surrounding legal text is complete for a particular jurisdiction.