Custom Fields


To retrieve custom field data there are some helper functions to make life a little easier.

Get the full list of fields for your object type

$fields = $data->custom_fields;

If you are in a custom loop you made you can also get the fields using:

$fields = getCustomFields('entry_'.$id); // objectType_object_id - page_2, or entry_31

Get a specific field or a repeater group

$hero_image = getField('hero_image');

$repeater = getField('my_repeater');

foreach( $repeater as $row ){

  $image = getRepeaterField('image', $row);
  $descr = getRepeaterField('image_descr', $row);   

}