Home › Forums › General Issues › ACF fields with Zurb's data interchange › Reply To: ACF fields with Zurb's data interchange
@ingvi I’ve got this working with a dynamic page ID variable. Here’s what I did.
<div data-interchange="[<?php echo home_url() ?>/path/to/file.php?page_id=<?php the_id() ?>, small], [<?php echo home_url() ?>/path/to/file.php?page_id=<?php the_id() ?>, large]"></div>
Notice the ?page_id=<?php the_id() ?>
at the end of each file
Then, in your partials, you would do
<?php require($_SERVER['DOCUMENT_ROOT'].'/wp-load.php'); ?>
<?php if(have_rows('field_name', $_GET['page_id'])): ?>
<?php while (have_rows('field_name', $_GET['page_id'])) : the_row(); ?>
// Your code here
<?php endwhile; ?>
<script>
// You may need to reflow some javascript items when they get loaded in
$(document).ready(function() {
// #element would be like a tab element or accordion element
$('#element').foundation();
});
</script>
<?php endif; ?>
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.