Guide to registering ACF fields via PHP

31.08.17 09:17 AM By Alan Pilloud

Registering ACF fields via PHP offers some interresting advantages – like easier deploys, fewer DB hits, usable in versioning systems etc.


Here is a guide of available ACF fields for you to include in your ACF field groups.

If you don’t know how to register fields via PHP, read Register fields via PHP.

Minimal requirement to register a field

Remember that only keylabelname and type keys are required.

You could write a simple field like this :

Key and name

This guide shows fields that have been exported directly from ACF visual editor. It creates fields with a key being a unique identifier.

To write fields faster without having to think too much, we follow this naming convention :

List of fields

The ACF Documentation now contains the same list of fields

This guide was really useful a few years ago as nobody documented the field configurations.

The ACF Documentation now includes the fields documentation.

Basic fields

Text

Text

Textarea

Textarea

Number

Number

Email

Email

URL

URL

Password

Password

Content Fields

Wysiwyg

Wysiwyg

Oembed

Oembed

Image

Image

File

File

Gallery

Gallery

Choice Fields

Select

Select

Checkbox

Checkbox

Radio

Radio

True / false

True / false

Relationnal Fields

Link

Link

Post Object

Post Object

Page link

Page link

Relationship

Relationship

Taxonomy

Taxonomy

User

User

Structure & Miscellaneous

Google Map

Google Map

Date picker

Date picker

Date time picker

Date time picker

Time picker

Time picker

Color picker

Color picker

Message

Message

Tab

Tab

Group

Group

Repeater

Repeater

Clone

Clone