S
S
sasha7612020-09-10 12:31:13
Twig
sasha761, 2020-09-10 12:31:13

How to pull acf fields from posts to other pages in timber (twig)?

Good afternoon. In general, the essence of the question is in the title, how to pull acf fields from posts to the main page in twig.

I made an acf field text ['doctors_work'] for posts in which I fill in the data and for the main page I made an acf field relationship ['doctors'] (in which I choose which posts to show), and I need to get the ['doctors_work'] field for each post which I take out.

It's easy to do this through php, but I don't understand how to do it in Twig. Thanks in advance for the answers. Thank you!
get_field( 'my_field', $post_id );

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question