Use shortcodes

⏱ 60-second answer below · full page ≈ 8 min · skim the bold lead-ins to move faster.
In short. Shortcodes are placeholder tokens — {{site_title}}, {{business_phone}}, {{page_title}} — that SGEN replaces with the live value at render time. Paste a token once into a footer widget, header CTA, or email template. When the underlying setting changes, every page that uses the token updates automatically — no per-page editing. Open Appearance → Shortcodes Helper to browse all available tokens grouped by Basic, Ecommerce, and Locations.

On this page: What shortcodes are · Where they work · Examples · Token reference table · Steps to use one · Troubleshooting


What is this for?

Shortcodes let you write "Call us at {{business_phone}}" once and have every page render your current phone number. Change the number in General Settings and every page updates at the same time, no per-page edits.

The Shortcodes Helper panel is a read-only reference listing every available token in three categories: Basic, Ecommerce, and Locations, plus a Data Information tab for context.

A typical your business site uses six or seven Basic tokens across the footer, header, and email templates. The status grid below summarises which tokens have a value populated in Settings and which would render empty:

Preview: Token coverage — your business — a screenshot of this screen will be added here.

Tokens marked Set / Per-page / Auto render their live value at request time. Any token whose source field is blank in Settings renders as empty text on the public page — never as the literal {{token}} (that only happens when the token name is misspelt).

Scope

Shortcodes (also called tokens) work in these surfaces: footer widget Paragraph fields, header Topbar message, email templates (order confirmation, account welcome), and any free-text admin field that passes through the shortcode engine. They do not work inside custom CSS, inside JavaScript, or in raw HTML fields such as the Code widget (the code widget bypasses expansion). Token values are resolved at request time from your SGEN settings — changing a setting value cascades to every surface that uses the token with no per-page editing.

Examples

Example 1: Keep your business's footer copyright accurate automatically. Write © {​{site_title}} 2026. All rights reserved. into the Footer legal row. your business has site_title set to "your business" in Settings. Before expansion (what you type) vs after (what visitors see):

Preview: Footer legal row — source vs public — a screenshot of this screen will be added here.

If your business renames itself to "Your Store" in Settings → General → Site Title, every page's footer updates on the next load — no per-page edit. The footer renders identically across home, blog, blog post, shop, and account pages because all of them include the same footer template.

Here is how the rendered footer looks on the public site after token expansion. Notice the legal line picks up the live site title and the contact line picks up the phone — both come from the same Settings → General form:

Preview: Public site preview — a screenshot of this screen will be added here.

Example 2: Reuse the business phone across the site. your business uses Call us at {{business_phone}} in the Header CTA and in a footer widget. Changing the phone in General Settings from (971) 555-0142 to (971) 555-9999 updates every page at once. The single source of truth is Settings → General, and the token is the live read.

The source field that drives {{business_phone}} lives on the General Settings form below. Edit the value, click Save Changes, and every shortcode reference repaints on the next page load:

Preview: General Settings — source values for Basic tokens — a screenshot of this screen will be added here.

After your business's owner an editor updates the phone number, the save flash confirms exactly which fields wrote — and therefore which tokens changed across the site:

Preview: Settings saved — a screenshot of this screen will be added here.

Example 3: Embed current page metadata on shared templates. Use {{page_title}} and {{page_url}} inside a shared SGB element (a breadcrumb component, a "Share this page" CTA) so each page shows the right title / link without per-page editing. your business's shared "Share on X" CTA uses this pattern:

Preview: Shared SGB template — Share on X button — a screenshot of this screen will be added here.

The same template ships on every blog post, every product page, and every CMS page. Each render fills the token with that page's title and URL — no per-page wiring.

Other common patterns. Email templates accept the same Basic tokens ({{site_title}}, {{business_phone}}, {{site_email}}); tokens expand at send time, so previously sent emails keep the old value. Footer widgets often combine {{business_address}} and {{business_hours}} in a single block — a multi-line textarea value in Settings, expanded identically wherever the token appears. The tel:{{business_phone}} pattern makes the phone number tappable on mobile while using the same token for visible text.

Reference

The Shortcodes Helper lists every token with a one-line description. For ready reference, the most-used Basic tokens and what each one reads from:

TokenReads fromRenders asEmpty when
{{site_title}}Settings → General → Site TitleThe text you typedSite Title is blank
{{site_description}}Settings → General → Site DescriptionThe text you typedDescription is blank
{{site_url}}Settings → General → Site URLFull URL (with https://)(always populated)
{{site_email}}Settings → General → Site EmailEmail addressEmail is blank
{{business_phone}}Settings → General → Business PhonePhone string as typedPhone is blank
{{business_address}}Settings → General → Business AddressMulti-line addressAddress is blank
{{business_hours}}Settings → General → Business HoursMulti-line hours blockHours field is blank
{{page_title}}The current page's title fieldPage titlePage title is blank
{{page_url}}The current page's URLFull canonical URL(always populated)
{{login_url}}SystemLogin route URL(always populated)
{{logout_url}}SystemLogout route URL(always populated)
{{custom_object_name}}Custom Objects (replace name)Whatever the object holdsObject missing or blank

Ecommerce tokens read from Ecommerce → Configuration and only resolve when Ecommerce is enabled — {{currency}}, {{shipping_origin}}, {{store_email}} etc. Locations tokens read from the active locations directory — {{location_name}}, {{location_phone}} etc. The full list lives in the helper's tabs (Basic / Ecommerce / Locations / Data Information).

Pre-launch checklist

Before you ship a shortcode-heavy template (footer rebuild, new email template, sitewide rebrand), walk this short list. Ten minutes here saves you a "site title shows blank on every page" moment after launch.

  1. Every token name in the template is exact-spelt against the helper's Tag column. Typos are the most common cause of literal {{token}} rendering on a public page; the renderer is strict.
  2. Every source field the template references is populated in Settings → General (or Ecommerce / Locations). Empty source field equals empty token render — and the surrounding HTML still renders, so a blank field can leave a half-broken footer line behind.
  3. The surface you pasted into runs the renderer (see the support table below). Image alt text, CSS files, and form input default values do not expand tokens; pasting tokens there is a silent no-op.
  4. You loaded the public page in an incognito tab to bypass admin-side caching and confirmed every rendered value reads correctly.
  5. If the change involved an email template, you sent yourself a test send — emails render at send time, not at edit time, so a typo in an email template only surfaces when an actual email is delivered.
  6. If you flipped a swatch, theme, or template recently, the surface still includes your tokens (template switches occasionally drop fields silently). Re-open the surface after the template change and confirm the tokens are still there.
  7. Triple-check tokens in URL fields. The Header CTA URL field and the menu URL fields validate against a URL pattern at save time and reject token-bearing strings — use relative paths (/contact) instead, which auto-resolve to the live site URL.
  8. For multi-language sites: tokens render the underlying source value, not a translated version. If you run an EN + a PH site, plan how the source-field value reads in both languages before you reference it from many surfaces.

Where shortcodes work and where they don't

Shortcodes expand wherever SGEN's content renderer runs — that covers the spots most teams need:

  • SGB page text elements — anywhere you can type body copy in the page builder. Drop a token into a paragraph, heading, or button label.
  • Header / Footer / Mobile Menu config — CTA labels, footer columns, copyright lines, contact rows.
  • Email templates — Basic tokens expand at send time. Ecommerce tokens expand inside ecommerce-triggered emails (order confirmation, shipping update, refund).
  • Custom Codes (HTML inserts) — tokens inside HTML written in /sg-admin/custom_codes expand at render. Useful for analytics / tag-manager wrappers that want the site title in a property name.
  • Blog post and CMS page bodies — drop a token mid-paragraph. Common pattern: Reach the {{site_title}} team at {{site_email}} inside an About post.

Where they do not expand:

  • Image alt text or filename — alt text is set as plain text; tokens render as the literal {{token}} string.
  • <title> / <meta> tags written by Custom Codes → head_scripts — the head scripts surface is sanitised differently; tokens in the head don't always run.
  • JavaScript string literals you paste into Custom Codes — the renderer expands tokens inside HTML, not inside arbitrary JS source.
  • CSS files or <style> blocks — tokens are content-layer only.
  • Form input default values — the token renders as literal text inside a form input, not the expanded value.

When in doubt: paste the token, save, and load the public page. If you see the literal {{token}} text, the surface doesn't run the renderer.

What NOT to use this for

  • Do not invent tokens. Only the tokens listed in the helper work. Typos ({{sitetitle}}, {{biz_phone}}) render as literal text on the public site.
  • Do not wrap the token in quotes or format marks. Write exactly {{site_title}} — the curly braces are the delimiter. {site_title}, {{ site_title }}, and &#123;&#123;site_title&#125;&#125; all fail to expand.
  • Do not use shortcodes for sensitive data. Tokens render wherever you put them; do not use them for admin-only values, API keys, or anything that should not appear on a public page.
  • Do not nest tokens. {{{{site_title}} does not expand twice. There is no token-inside-token recursion; the renderer resolves once per render pass.
  • Do not use a token in a place expecting a number or boolean. Tokens always expand to strings. Settings fields that store numeric or boolean values won't accept a token reference.
  • Do not paste shortcodes into URL fields that the admin validates. The Logo link target, the menu URL fields, and the Header CTA URL fields validate against a URL pattern at save time. A token-bearing URL like {{site_url}}/contact won't pass validation. Use a relative path (/contact) instead — those resolve to the live site URL automatically.
  • Do not rely on a token to hide a field. If a token's source value is blank, the token renders as empty text (not as a hidden node). The HTML around it still renders. Wrap the token in a conditional in your template or leave the surrounding copy generic enough to read with the value missing.

Before you start

  • You are signed in to SGEN as an admin with Appearance access.
  • The value the shortcode should show (site title, phone, address) is set in the matching Settings area. Set it before you reference the token, otherwise the rendered text reads empty.
  • You know which panel (Basic / Ecommerce / Locations) your token lives in. Basic covers identity + contact + page metadata; Ecommerce covers store config; Locations covers a multi-location directory.
  • If you plan to use Ecommerce or Locations tokens, those features are enabled on your site. The tokens render empty otherwise.
  • For email-template work, you have access to the email-template editor (a separate panel from Appearance). Token syntax is identical; the surface is different.
  • You know which surfaces you intend to update (footer, header CTA, email templates). Tokens are paste-once; identifying the surfaces first saves a round-trip.

Where to go

  1. Open the left navigation.
  2. Click Appearance → Shortcodes Helper. The page shows a tabbed table of every available token:
Preview: Shortcodes Helper — a screenshot of this screen will be added here.
  1. Click the Basic, Ecommerce, or Locations tab to filter the list. Click Data Information for the context tab.
  2. Copy the {{token}} text from the Tag column.

Steps

1. Copy a token from the helper

Open Appearance → Shortcodes Helper. Find the row whose description matches what you need (site title, phone, current page URL). Triple-click the token in the Tag column to select it, copy with Ctrl/Cmd+C. The exact string to paste is what's inside <code>..</code> — including the double curly braces on both sides.

If you'll use the same token in many places, save the string to a snippet manager or a sticky note. The helper does not have a "Copy" button; selection-and-copy is the documented path.

2. Paste the token into your content

The right surface depends on what you're editing:

  • Footer / Header / Mobile Menu — paste inside any text input, button label, or copyright line on the Theme Editor → Header / Footer / Mobile Menu tabs. Tokens in CTA URLs are not supported (the field validates as a URL); use relative paths instead.
  • SGB page element — open the page in the SG-Builder editor, click a text or paragraph element, paste the token mid-sentence. Save the page. The token expands at publish time and on every page load thereafter.
  • Blog post body — paste the token inside the post body editor. Save and publish. Same expansion behaviour as SGB pages.
  • Email template body — paste inside the email body. Tokens expand at send time per recipient.
  • Custom Codes (HTML) — paste inside an HTML snippet under /sg-admin/custom_codes. Tokens inside HTML run through the renderer; tokens inside <script> blocks do not.

The two-curly-brace syntax is sacred. Do not add spaces inside the braces; do not wrap the token in quotes; do not HTML-encode the braces.

3. Save the container

Save the surface you pasted into:

  • Footer / Header / Mobile Menu — click Save Changes at the bottom of the tab.
  • SGB page — click the publish button in the top toolbar.
  • Blog post — click Save & Publish in the post editor.
  • Email template — click Save Template in the email editor.

The save flash banner names which fields wrote — confirm the field whose value will drive your token is in the list.

4. Verify on the public site

Open the public page (or send yourself a test email for the email path). Confirm the token rendered as the expected value — your site title, phone, address, page title, etc.

If the rendered text reads the literal {{token}} (curly braces and all), the token name is misspelt. If the rendered text is empty, the source field in Settings is blank. Both cases are fixed in the source — the renderer is doing the right thing.

5. Update once, propagate everywhere

When you need to change the value (new phone number, rebrand the site title, new business hours), edit the source field in Settings → General — not the pages that reference it. Every page that uses the token picks up the new value on the next page load.

This is the core value of shortcodes: one field edit in Settings, and every surface that references the token updates on the next page load.

What success looks like

  • The public page shows the live value — not the literal {{token}} text.
  • Changing the source field in Settings and reloading the public page reflects the new value sitewide with no per-page edit.
  • Page-scoped tokens ({{page_title}}, {{page_url}}) render the current page's metadata on every page they appear on without per-page wiring.

What to do if it does not work

  • My token renders on the page. Double-check spelling — the helper's Tag column is the source of truth. Typos render as-is. Common gotchas: {site_title} (single braces — won't expand), {{ site_title }} (spaces inside braces — won't expand), {{sitetitle}} (underscore omitted — not a valid token).
  • {{business_phone}} is empty. Set a business phone in Settings → General → Business Phone and Save Changes. Empty source = empty token output. The HTML around the token still renders, so a footer line like "Call us at " (with the empty token) reads slightly broken — write the surrounding copy to read cleanly even when the value is blank.
  • An Ecommerce token renders empty. Confirm Ecommerce is enabled on your site (Settings → Modules) and set the corresponding value in Ecommerce → Configuration. Ecommerce tokens render empty if the module is off.
  • A Locations token renders empty. Locations directory is not configured or the page isn't location-scoped. Set up Locations under Locations → Directory and ensure the page that consumes the token has a location context.
  • The token is correct, the source value is set, but the page still shows the old value. Hard-reload the public page (Ctrl+Shift+R). CDN cache may be holding the previous render for up to an hour. The source value is the new one; only the cached HTML is stale.
  • The token expands inside body copy but not inside an image alt text I wrote. Expected — alt text is plain-text-only and does not run through the shortcode renderer. The same applies to filename, form-input default values, and CSS files.
  • The token works on every page except the home page. Confirm the token's surface (footer, sidebar, etc.) is rendered on the home page. Some templates exclude the standard footer on a hero-only home; pasting a token into the standard footer doesn't help if the home page uses a different template. Open Appearance → Templates and confirm the active template chain for home includes the surface you edited.
  • {{page_title}} shows the SGEN install title on a blog post, not the post title. Blog posts use {{post_title}} in some installs; confirm via the helper's Basic tab whether your install ships {{page_title}} for posts or a separate token. The helper is the canonical reference for your specific instance.
  • Tokens work everywhere except inside Custom Codes → head_scripts. Head-script content is sanitised differently than body HTML; tokens may not expand. If you need the site title in a <meta> or <title> tag, set it via Settings → SEO instead — that surface runs the renderer.
  • Half my footer renders correctly and half shows literal {{tokens}}. This usually means a stray character snuck into one of the token strings — a non-breaking space, a smart-quote, or an extra brace from an autocomplete. Re-copy from the helper and re-paste; do not retype tokens.

Related features