Home › Forums › General Issues › ACF fields with Zurb's data interchange › Reply To: ACF fields with Zurb's data interchange
Hi Elliot,
I’ve fixed it. Interchange does indeed use ajax to switch out files and I think that’s why the acf values weren’t being loaded – because, as you correctly pointed out, wp didn’t know which post to pull them from.
I added the page ID to the repeater code and it worked:
<?php
require($_SERVER['DOCUMENT_ROOT'].'/pwp/wp-load.php');
?>
<div class="phone_email_holder">
<p>LARGE TEMPLATE</p>
<?php if( have_rows('phone_numbers', 7) ): ?>
<?php while( have_rows('phone_numbers', 7) ): the_row(); ?>
<div class="contact_field_wrapper row">
<div class="phone_email_label info_label">
<?php echo get_sub_field('number_label', 7) ?>:
</div>
<div class="phone_email_value">
<?php echo get_sub_field('tel_number', 7) ?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
However, it does have to include the wp-load file to work.
Thanks for your help on this. I only recently discovered ACF and it’s bloody amazing. Good work!
Thanks,
Xav
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.