Answer the question
In order to leave comments, you need to log in
How to make it so that you can change the information in header.php and it changes on all pages?
The bottom line is that I have a multi-page site and I need to include a header on all pages. I connect it, I see all the information that is there. But now there was a problem, I need to be able to change it through the advanced custom field plugin, how can I implement this? through the creation of a page where the default template is specified, nothing changes, and if you specify a template for a specific page, it changes only on one.
Answer the question
In order to leave comments, you need to log in
Hello!
1) If you connect ACF to templates that imply some kind of "globalness" (for example, heade.php & footer.php), then use acf options. For example, you can move theme settings to a separate admin menu item.
Then, as the second argument for displaying the acf field, pass option there
. Details - https://www.advancedcustomfields.com/resources/opt... as the second argument for the field, pass the ID of the page for which this custom field was created. - 12 is the ID of the page for which the field was created
'header_title', 'option');
the_field(
<?php the_field('header_title', 12); ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question