A
A
Andrey2021-12-08 12:11:40
WordPress
Andrey, 2021-12-08 12:11:40

How can I display fields from acf to another page?

There is a block consisting of fields screwed to a specific page

<div class="sbrlist">
      <?php if ( get_field('slogan_3img') ) { ?>
      <div>
      <?php the_field('slogan_3img'); ?>
      </div>
      <?php } ?>
      <?php if ( get_field('slogan_3block') ) { ?>
      <div>
      <?php the_field('slogan_3block'); ?>
      </div>
      <?php } ?>
      <?php if ( get_field('knopka3') ) { ?>
      <div>
      <a data-fancybox data-src="#order4"><?php the_field('knopka3'); ?></a>
      </div>
      <?php } ?>	
    </div>

you need to display the same block in record types,
but if you specify a binding to the record type for this group of fields, then under each record you need to fill in these fields in a new way,
I would like to avoid this hemorrhoids
is it possible to display the filled block with fields that is linked to the main one in record types not filling it out for each entry, but only filling it out for the main one?
I hope I explained clearly

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dymok, 2021-12-08
@klekovkinandrey

get_field('knopka3', 123)
Where 123 is the ID of the record for which the field is filled

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question