Global fields

Global fields in ACF work similar to Shop fields and the two can be used interchangeably. One crucial difference is that global fields can be referenced from field definitions belonging to other scopes such as products, collections, pages etc. (see related article below).

This allows you to use global fields as puzzle pieces for building your field definitions for a specific scope, making it a breeze to maintain cross-site content of any type.

You define and edit global fields as you would for any other scope in ACF. This allows you to store content globally available (within your shop, that is)

Restrictions

Custom fields for the global scope are saved as shop-level metafields and have their namespace locked to  globals. You cannot create global fields with other namespaces than the above and you cannot use the globals namespace for shop-level custom fields.

Accessing global metafields

To access a global custom field value, use this construct:

shop.metafields.globals.my_field_name

Referencing global metafields

See related article below

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us