Advanced Custom Fields

Settings And Globals

ACF options pages are fields stored outside the current post. TemplateX reads them through an options scope.

Globals Scope#

If your ACF options page menu slug is globals, use globals:

php
{{ globals }}  <img src="{{ logo }}" alt="">  <p>{{ tagline }}</p>{{ /globals }}

Inside the paired tag, plain field names are read from that options page.

This tag is a scope, not a loop: it changes where fields are read from.

One Field#

Use slug:field when you only need one option value:

php
<p>{{ globals:tagline }}</p><img src="{{ globals:logo }}" alt="">

Nested values work too:

php
<a href="{{ globals:cta.url }}">{{ globals:cta.title }}</a>

{{ globals:tagline }} is a value tag. It does not use a closing tag.

Any Options Page Slug#

The slug is not special. If your ACF options page menu slug is footer_settings, use that:

php
{{ footer_settings }}  <p>{{ copyright_text }}</p>{{ /footer_settings }}

TemplateX matches the options page by menu slug first. It also accepts the page's ACF post_id, page title, or menu title when ACF exposes those values.

Collections Inside Globals#

Options pages can contain repeaters, galleries, relationships, post objects, taxonomy fields, and nested arrays:

php
{{ globals }}  {{ social_links }}    <a href="{{ url }}">{{ title }}</a>  {{ else }}    <p>No social links yet.</p>  {{ /social_links }}{{ /globals }}

Each item inside the loop uses the same fields and helpers as normal ACF collection loops.