Enable QuickCode

QuickCodes is an intuitive tool designed to simplify and accelerate the process of creating posts and archive pages

QuickCode is a {{...}} placeholder language you can use in a snippet’s HTML to pull in
dynamic WordPress data — site info, the current user, post/term/menu data, queries, dates and more —
without writing PHP.

In the HTML editor, the QuickCode button (or Ctrl/Cmd + E) opens a searchable inserter
listing every code.

When it works

  • QuickCode placeholders work only when the “Enable QuickCode” tool is on (Tools → Site Tools).
    When off, the placeholders are left untouched.
  • {{global.name}} is gated separately by the Global Variables tool, and also works inside
    inline CSS/JS.
  • Most values are inserted as real HTML; {{query.*}} and {{date.now}} are escaped.

General

Code Output
{{obj.id}} ID of the current page/post/term being viewed.
{{option.KEY}} Any WordPress option by key (e.g. {{option.blogname}}).
{{query.PARAM}} A URL query value (e.g. {{query.utm_source}}).
{{date.now}} Current date/time in your site format. Custom: {{date.now format="d.m.Y H:i"}}.
{{global.KEY}} A site-level variable from Tools → Global Variables.

Site

Code Output
{{site.name}} Site title.
{{site.url}} Site URL.
{{site.description}} Tagline.
{{site.admin_email}} Admin email address.

User (current visitor — empty for guests)

Code Output
{{user.id}} User ID.
{{user.name}} Display name.
{{user.email}} Email.
{{user.login}} Username.
{{user.avatar}} Avatar URL.
{{user.role}} First role of the user.
{{user.meta.KEY}} A custom field of the current user.

Request

Code Output
{{request.ip}} Visitor IP address.
{{request.url}} Full URL of the current request.
{{request.host}} Host name.
{{request.path}} Path part of the URL.
{{request.method}} HTTP method (GET, POST, …).
{{request.referer}} Referring URL (empty when none).

⚠ Request values are checked per request, so behind full-page caching the cached page is served
without re-checking them.

Conditional

{{language.LOCALE}}…{{/language}}

Show the inner content only when the site language matches LOCALE. Chain several for multilingual
output:

{{language.en_US}}Text{{/language}}{{language.es_ES}}Texto{{/language}}

{{empty.VALUE}}…{{/empty}}

Show the inner content based on whether VALUE is empty — typically by nesting another placeholder:

{{empty.{{post.meta.price}}}}Price: {{post.meta.price}}{{/empty}}

⚠ Despite the name, this block shows its content when VALUE is NOT empty (and nothing when
empty) — think of it as “show when not empty”. The nested value must not contain a } character.

Term — {{term.FIELD.TERM_ID}}

Insert a field of a specific term by ID. FIELD is one of id, name, link, description,
count. Example: {{term.name.42}}. ⚠ The third part must be the real numeric ID.

Loop over a nav menu’s items by its ID. Inside the block:

Code Output
{{item.label}} Item label.
{{item.link}} Item URL.
{{item.target}} Link target (e.g. _blank).
{{item.title}} Title attribute.
{{item.description}} Item description.
{{item.class}} CSS classes on the item.
{{item.current}} aria-current="page" on the active item.
{{item.current_class}} Active-item CSS class.

Post / Page

These work on single posts/pages (and inside post loops).

Code Output
{{post.id}} Post/page ID.
{{post.title}} Title.
{{post.excerpt}} Excerpt.
{{post.content}} Full content.
{{post.clean_content}} Content without auto-paragraphs.
{{post.markdown_content}} Content rendered from Markdown.
{{post.link}} Permalink.
{{post.image}} / {{post.image_url}} Featured image tag / URL.
{{post.cat_name}} / {{post.cat_link}} / {{post.cat_count}} First category name / link / count.
{{post.publish_date}} / {{post.update_date}} Published / modified date.
{{post.author_name}} / {{post.author_bio}} / {{post.author_avatar}} / {{post.author_link}} Author details.
{{post.comments}} / {{post.comments_count}} Comments block / count.
{{post.previous}} / {{post.next}} Previous / next post ID.
{{post.meta.KEY}} A custom field value.

By post ID (any post, anywhere)

{{post.link.id.POST_ID}}, {{post.title.id.POST_ID}}, {{post.excerpt.id.POST_ID}},
{{post.image.id.POST_ID}} — insert a field of a specific post by ID.

Tags loop — {{tags}}…{{/tags}}

Loop over the current post’s tags. Inside: {{tag.id}}, {{tag.link}}, {{tag.name}},
{{tag.description}}, {{tag.count}}.

Archive

Work on archive pages.

Code Output
{{archive.title}} Archive title (without the Category: / Tag: prefix).
{{archive.description}} Archive description.
{{posts}}…{{/posts}} Loop over the archive’s posts; use any {{post.*}} code inside.
{{posts.pagination}} Pagination for the loop.

Posts query loop — {{get_posts.PARAMS}}…{{/get_posts}}

Run a custom query and render the inner template for each result. PARAMS is a list of key|value
pairs separated by .:

{{get_posts.post_type|post.posts_per_page|5.orderby|date}}
  <a href="{{post.link}}">{{post.title}}</a>
{{/get_posts}}

Add {{get_posts.pagination}} outside the loop for pagination.


ACF — {{acf.FIELD}}

Insert an Advanced Custom Fields value. Works only when ACF (or ACF Pro) is active.

  • {{acf.FIELD}} — field of the current post/page.
  • {{acf.FIELD.id.POST_ID}} — field of a specific post.

WooCommerce — {{product.FIELD}}

Insert WooCommerce product data. Works only when WooCommerce is active. Use the bare form on a single
product (or per row inside a posts loop), or {{product.FIELD.id.POST_ID}} for a specific product.

Code Output
{{product.name}} Product name.
{{product.price}} Formatted price (with sale markup).
{{product.price_raw}} Raw active price.
{{product.regular_price}} / {{product.sale_price}} Regular / sale price.
{{product.sku}} SKU.
{{product.stock}} / {{product.stock_status}} Stock quantity / status.
{{product.in_stock}} / {{product.on_sale}} yes / no.
{{product.rating}} / {{product.review_count}} Average rating / review count.
{{product.short_description}} Short description.
{{product.add_to_cart_url}} / {{product.add_to_cart}} Add-to-cart URL / button.

Notes

  • Enable QuickCode must be on (except for {{global.*}}, which needs the Global Variables tool).
  • Context matters: {{post.*}} needs a single post/page; {{archive.*}} and {{posts}} need an
    archive; {{tags}} needs the post to have tags.
  • Most output is real HTML; only {{query.*}} and {{date.now}} are escaped.