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; ?>
        // 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
    <?php endif; ?>