API Reference

Template functions for retrieving and working with field values.

ACF Compatible

get_field()

Returns the value of a field. This is the most commonly used function.

Parameters

  • $field_name — The field name/key
  • $post_id — Post ID (defaults to current post)
  • $format — Whether to format the value

the_field()

Outputs the value of a field (escaped). Shorthand for echo esc_html(get_field()).

get_fields()

Returns an array of all field values for the given post.

update_field()

Updates the value of a field programmatically.

delete_field()

Deletes a field value.

Repeater Fields

Functions for working with repeater fields.

have_rows() / the_row()

Loop through repeater rows using the WordPress-style while loop.

get_sub_field()

Get a sub-field value from within a repeater loop.

get_rows()

Get all repeater rows as an array (useful for programmatic access).

Object ID Formats

The $post_id parameter accepts different formats for various object types.