A
A
ArtiomY2021-07-16 19:54:29
WordPress
ArtiomY, 2021-07-16 19:54:29

How to display fields on the recent posts page in WP (plugin - ACF)?

How to display fields on the latest posts page in WP (plugin - advanced custom fields)?
If this plugin does not work, what other options are there for changing information on the recent posts page (number, email, company address, etc.)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
ArtiomY, 2021-07-16
@ArtiomY

Found an answer to your question.
We create a new page in WP with any name, for example "General Information".
Copy the post id from the url
60f1efe92f799222093572.jpeg
In ACR, specify this page in the display conditions.
60f1ef2588344301401276.png
Further, in the code of the the_field() or get_field() function, we specify the id of our page as the second argument. For example: Now we fill in the fields on the "General Information" page and this data will be displayed on all pages where we have specified the id of this page. Thank you, Habr, for your help)))
<?php the_field('phone', '151'); ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question