Pulling Advanced Custom Fields from other pages
-
02-11-2019 - |
Question
Basically I am using Advanced Custom Fields and have an ajax tabbing system that works with the ACF.
The current set up is below:
<ul class="css-tabs">
<li><a class="current" href="/wp-content/themes/blue-and-grey/uni-general.php">General</a></li>
<li><a href="/wp-content/themes/blue-and-grey/uni-courses.htm">Courses</a></li>
<li><a href="/wp-content/themes/blue-and-grey/uni-inthearea.htm">In the area</a></li>
<li><a href="/wp-content/themes/blue-and-grey/uni-sportsandfacilities.htm">Sports & facilities</a></li>
</ul>
At the moment, I am loading external php documents through AJAX, only problem is, the php is not loading as when echo'ing that field, it cannot be found as it is held elsewhere.
How can I use the custom fields to display what's in that page template, that is held elsewhere?
I current am using:
<?php echo the_field('current_students'); ?>
To display the field, but where it's an external PHP document, it doesn't work.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange