I'm using ACF to add fields to a custom post type.
I've created an instance of WP_Query to set up a loop. Within the loop I can publish the standard fields using the_title() and the_content(). However, the ACF function the_field isn't publishing values for attached fields.
Neither 'the_field()' nor 'echo the_field()' products the field values.
So... how exactly can I publish these values?
This is my loop:
$jobs_query = new WP_Query($args) ;
if ($jobs_query->have_posts()) : ?>
<section id="jobs-list">
<?php while ($jobs_query->have_posts()) : $jobs_query->the_post(); ?>
<article class="">
<h3 class="job-title"><?php the_title() ?></h3>
<div class="employer">
<p><?php the_field('employer') ?></p>
</div>
<div class="job-description">
<?php echo the_field('job_description') ?>
</div>
<p class="job-readmore"><a href="<?php echo get_permalink() ?>">read more</a></p>
</article>
<?php endwhile; ?>
<h4>done</h4>
</section>
<?php endif; ?>