> For the complete documentation index, see [llms.txt](https://metabolism.gitbook.io/symfony-wordpress-bundle/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://metabolism.gitbook.io/symfony-wordpress-bundle/integrations/advanced-custom-fields.md).

# Advanced Custom Fields

ACF values are available under the custom\_fields property

```liquid
{{ post.custom_fields.subtitle }}
```

#### Return format

Image, post, term and user are converted to entity if the return type `entity` is selected in the field settings

<div align="left"><img src="/files/e30IekAyVWc7AkNUf9Kn" alt="ACF field settings"></div>

### Specific fields

#### Flexible content

Content is parsed into an array of object, `acf_fc_layout` is renamed as `type` and remaining content is included into the `data` property

```liquid
{% for content in post.custom_fields.flexible_content %}
  {% include content['type'] ~ '.html.twig' with { data: content.data } %}
{% endfor %}
```

#### Repeater

Content is parsed into an array

```liquid
{% for content in post.custom_fields.repeater %}
  {{ content.title }} {{ content.subtitle }}<br/>
{% endfor %}
```

#### Gallery

Content is parsed into an array of [Image](/symfony-wordpress-bundle/reference/entity/image.md)

```liquid
{% for image in post.custom_fields.gallery %}
  {{ image|picture(800,600) }}
{% endfor %}
```

#### Image

Content can be converted to [Image](/symfony-wordpress-bundle/reference/entity/image.md) entity

```
{{ post.custom_fields.image|picture(800,600) }}
```

#### Post object

Content can be converted to [Post](/symfony-wordpress-bundle/reference/entity/post.md) entity

```liquid
{% set other_post = post.custom_fields.other_post %}
<a href="{{ other_post.link }}">{{ other_post.title }}</a>
```

#### Relationship

Content can be converted to an array of [Post](/symfony-wordpress-bundle/reference/entity/post.md) entity

```liquid
{% for other_post in post.custom_fields.relationship %}
  <a href="{{ other_post.link }}">{{ other_post.title }}</a><br/>
{% endfor %}
```
