Documentation

Getting Started

What is ACF?

New to ACF? Please read this first to understand more about this plugin
Learn More »

Requirements

Advanced Custom Fields does not rely or require any other plugins to operate.
Learn More »

Installation

Simple installation instructions to get you on your way.
Learn More »

Upgrading

Read this and remember to backup!
Learn More »

FAQ

A list of known issues / conflicts and some simple solutions to fix them.
Learn More »

Creating a Field Group

Discover how you can create, add and use custom fields to enhance your website!
Learn More »

Displaying field data in your theme

Learn the basics to add field values to your theme template files.
Learn More »

Code Examples

Lots of ACF examples to help you with your web project
Learn More »

Adding Custom jQuery to fields

A jQuery action to add functionality to newly added HTML
Learn More »

Migrating from v3 to v4

To make your upgrade a seamless operation, please read this guide before updating.
Learn More »

Field Types

Text

Single line text input
Learn More »

Textarea

Multiple line textarea
Learn More »

Wysiwyg Editor

Rich Text Editor
Learn More »

Image

Upload and Select an image
Learn More »

File

Upload and select a file
Learn More »

Select

Used for choices. Can return 1 or more values
Learn More »

Checkbox

Used to select multiple options
Learn More »

Page Link

Select a page / post. API returns the url
Learn More »

Post Object

Select a page / post. API returns a post object
Learn More »

True / False

Creates a check box beside text. API returns true or false
Learn More »

Date Picker

jQuery date picker
Learn More »

Relationship

The Relationship field creates a very attractive version of the post object field.
Learn More »

Repeater

Create a table of data where you can define the columns (sub fields) and add infinite rows. This field is useful for image galleries, lists of data and even advanced content layouts.
Learn More »

Flexible Content

The Flexible content field acts as a blank canvas to which you can add an unlimited number of layouts with full control over the order.
Learn More »

Gallery

The Gallery field creates a simple and intuitive interface for managing a collection of images
Learn More »

Functions

get_field()

Returns the value of the specified field
Learn More »

the_field()

Displays the value of the specified field. This is the same as “echo get_field"
Learn More »

has_sub_field()

Used in a while loop, this function loops through repeater and flexible content rows of values
Learn More »

get_sub_field()

Retrieve a sub field value from the current row of a Repeater or Flexible content field
Learn More »

the_sub_field()

Displays a sub field value from the current row of a Repeater or Flexible content field
Learn More »

get_row_layout()

This function returns the current layout within a has_sub_field() loop
Learn More »

update_field()

Update any field value with PHP
Learn More »

get_field_object()

Returns an array holding all the field's attributes / options
Learn More »

Shortcode

Shortcodes can be used withing a WYGIWYG to display another field's value
Learn More »

get_fields

Returns an array of custom field values for a specific page / post.
Learn More »

Actions

acf_head-input

Equivalent of admin_head for input screens
Learn More »

acf_print_scripts-input

Equivalent of admin_print_scripts for input screens
Learn More »

acf_print_styles-input

admin_print_styles for input screens
Learn More »

acf_head-fields

Equivalent of admin_head for the edit field group page
Learn More »

acf_save_post

This action is called when a page / post / options page / taxonomy / user / attachment is saved
Learn More »

Filters

acf_settings

Override the global settings array used by ACF throughout the plugin.
Learn More »

acf_options_page_title

This hook allows you to override the "Options Page" menu item title.
Learn More »

acf_load_value

This hook allows you to modify the value of a field right after it is loaded from the database.
Learn More »

acf_update_value

This hook allows you to modify the value of a field before it is saved to the database.
Learn More »

acf_load_field

This hook allows you to modify a field after it is retrieved from the database / registered code.
Learn More »

acf/fields/wysiwyg/toolbars

This hook allows you to modify the toolbars available to the WYSIWYG field
Learn More »

Deprecated functions

the_repeater_field()

This function has been deprecated. Please use has_sub_field
Learn More »

the_flexible_field()

This function has been deprecated. Please use has_sub_field
Learn More »

Tutorials

Creating a new field type

The following tutorial will explain how to create and define a new field type.
Learn More »

Nested Repeaters

In this tutorial, we will build a simple template to display a nested repeater's content
Learn More »

Sorting a Repeater Field

Sort a repeater field using the array_multisort() function
Learn More »

Custom location rules

Define custom rules to show / hide a field group
Learn More »

Retrieving values from “other” pages (Taxonomy, user, media)

All the API functions can be used with the "Other" pages (taxonomy / user / media)
Learn More »

Retrieving values from the options page

All the API functions can be used with the "Options Page's" fields
Learn More »

Register multiple options pages

Create sub pages under Options
Learn More »

Hide ACF Menu from Clients

Prevent your client from changing / deleting fields and will keep the website running smoothly.
Learn More »

Creating a front end form

Use the functions “acf_form()” and "acf_form_head()" to create a front end form to edit a page / post.
Learn More »

Querying relationship fields

Learn the techniques to query relationship fields in both directions. The example used will be "Doctors" and "Locations".
Learn More »