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
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.