Answer the question
In order to leave comments, you need to log in
How to create one custom field for all pages of a WordPress site at once?
I'm doing adaptation on WordPress. We need to make it so that the client can edit the phone number in the contact part of the footer. I created a custom field and placed the function <?php the_field('field_name'); ?> in the footer. the problem is that if you set the display of the field only on one page, then only it will change. How to make sure that the client changes the value only in one place, and the changes occur on each page, and it would not be necessary to change the values on each page separately?
Answer the question
In order to leave comments, you need to log in
If you have the paid version of ACF Pro, then there is an options page. She is see-through.
For the free version, we take the field in the same way, bind it to some page, and display it, passing the page id as the second argument.
If there are a lot of settings, we start a separate page for this, name its options, make it private and saw all the options into it. We display exactly the same - the second argument is the page id
'field_name', id);
the_field(
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question