# 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 %}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://metabolism.gitbook.io/symfony-wordpress-bundle/integrations/advanced-custom-fields.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
