Support

Account

Home Forums General Issues ACF fields with Zurb's data interchange Reply To: ACF fields with Zurb's data interchange

  • Hi @Xav

    including files or ‘partials’ is a common templating task which does not usually prove so dificult. There must be something else going on here.

    The require($_SERVER['DOCUMENT_ROOT'].'/pwp/wp-load.php'); code should never be included in a correct page template.

    I think the issue is that you are including them in a non PHP friendly way. How does Zurb’s data interchange work?

    Your origional code:

    <div data-interchange="[<?php echo get_stylesheet_directory_uri();?>/library/interchange/contact_details_small.php, (small)], [<?php echo get_stylesheet_directory_uri();?>/library/interchange/contact_details_default.php, (medium)], [<?php echo get_stylesheet_directory_uri();?>/library/interchange/contact_details_default.php, (large)]">
    </div>

    Shows that you place urls into a data attribute on a div. Have you checked the docs to see if these can be PHP files? If so, are they loaded via an ajax request? If so, how would WP know what $post to query for that file?

    Thanks
    E