获取Timber + WordPress中所有用户的ACF字段

I am trying to create a page overview of all users on my website, but when using get_users as described in the Timber documentation, I only get an object with the standard values, such as display_name, ID & description.

page-bloggers.php

    $author_args = array(
        'orderby'      => 'display_name',
        'order'        => 'ASC',
        'meta_query'    => array(
            array(
                'key'       => 'author_guestblogger',
                'value'     => '0',
                'compare'   => '=',
            ),
        ),
     );

    $authors = get_users( $author_args );
    $context['authors'] = get_users( $author_args );

page-bloggers.twig

        {% for blogger in authors %}
            <article class="author">
                <a href="{{site.url}}/author/{{blogger.user_nicename}}">
                    <h1>{{blogger.display_name}}</h1>
                    <p>{{blogger.ID}} - {{blogger.description}}</p>
                    <p>{{blogger.get_field('author_place')}}</p>
                </a>
            </article>
        {% endfor %}

I can get the display_name and ID, but the get_field('author_place') is not working. How do I get the ACF values inside the get_users loop? Also the url could be better than this I guess :-)

Thanks in advance!

Try to call get_field as a Timber function:

{{ fn('get_field', blogger.ID) }}

You might just need to pass the ID as its probably not the current Query when you are running the code.

{% for blogger in authors %}
    <article class="author">
        <a href="{{site.url}}/author/{{blogger.user_nicename}}">
        <h1>{{blogger.display_name}}</h1>
        <p>{{blogger.ID}} - {{blogger.description}}</p>
        <p>{{blogger.get_field('author_place', blogger.ID)}}</p>
    </a>
</article>
{% endfor %}