Getting started with ACF

What is a custom field?

A custom field is a placeholder for data, you cannot fit into Shopify's existing fields for pages, products, collections, etc. available in your Shopify admin detail pages. Typical custom fields are extra product description fields such as origin details, materials, ingredients and care instructions as well as fields for holding specific information in your area of business, such as product retail prices, specifications, dimensions, weight etc. etc. You can also create extra fields to control your design layouts such as creating linked products, custom product filters, hiding of specific products or articles from searches, or call-to-action text on buttons.

How do I create a custom field in ACF?

In ACF, you start out by defining your field for the relevant type of object (for example a product, a collection, a page, etc). A field definition is needed to tell ACF the type of data the field is supposed to hold - a text, a number, a reference to (another) product, an image, or whatever you need - so when you edit your custom fields for e.g. a specific page, the ACF editor knows how to present your input field (including a title and instructions for the intended use) and accept new values being inputted.
Any number of custom fields can be defined. While there is no set upper limit, there certainly is a practical upper limit if the field list gets very long and as a result hard to manage.
Once a field definition has been created for a certain scope (e.g. products), you can use the ACF editor to enter values for this field for each of your products. You can launch the editor from the list of field definitions using the "Edit values" button but for some object types (like products and pages), you can also launch the editor from Shopify's admin pages. Look for the More actions dropdown near the top of the page and then choose Custom Fields.

Where are my custom fields stored?

All custom field definitions as well as the values you enter for individual pages, products etc. are stored as Shopify Metafields within your Shopify store. Metafields are an integral part of the Shopify platform and besides providing secure storage for your data, they can immediately be used via Liquid in your design templates to show your new data to your visitors.

What is a namespace?

Namespaces are an integral part of Shopify metafields and are therefore used as a mechanism for defining ACF custom fields, that ultimately will end up as Shopify metafields. Namespaces can be used to ensure one app's metafields won’t clash with other apps’ metafields like e.g. Shopify Reviews, which uses a namespace of "spr". Using the default accentuate namespace will ensure you are defining a separate set of metafields, but you can always override this on a field-by-field basis if you like. It is also a great way to (technically) group sets of fields that naturally belong together. If you for example need to have two fields, "title" and "rating" for videos, you could opt for grouping them under the namespace "video" giving you two fields called "video.title" and "video.rating". Then if you need the same two fields for an image, you could place these under the namespace "image" giving you "image.title" and "image.rating" that don't collide with the video fields. If you need to use ACF to manage metafields created from other apps, you can match the namespace and key for the fields when defining the field type and ACF will automatically use any existing values going forward. Just take care to define a field type that makes sense with regard to any existing data.
Some namespaces are reserved for internal ACF use and cannot be used for field definitions. The field definition dialog will not allow you to define fields using the namespaces acf_settings, product_types, vendors, locations or globals
Last modified 11d ago