including files or ‘partials’ is a common templating task which does not usually prove so dificult. There must be something else going on here.
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?
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!
© 2022 Advanced Custom Fields.