Z
Z
zeaovede2021-10-28 18:41:27
WordPress
zeaovede, 2021-10-28 18:41:27

How to display the contents of the fields for several pages at once through ACF?

How to display the contents of the fields for several pages at once through acf? For example, the site has 20 pages with the same content. I need to go to each page from the admin panel and fill in the fields with my hands, and so on for each page. And in the case of edits, I need to go to each page again. Is there any solution that will allow you to display the contents of the fields not for one page, but for all (several) pages at once? That is, by filling in the content 1 time, the same content is displayed on the other 20 pages

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Zolin, 2021-10-28
@artzolin

The function get_field()has a second parameter $post_id , in which you can specify the post id from the meta of which you want to take data

get_field( $selector, [$post_id], [$format_value] );

Or create a field in the options of the site and take it from there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question