this is maybe stupid question but I am having a real struggle here. I have this loop:
$query = new WP_Query('posts_per_page=1&orderby=rand');
if ($query->have_posts()): while ($query->have_posts()): $query->the_post();
// get the id for our current post and store it in a variable
$hero_post = get_the_ID();
and this in my home-hero.php:
<p class="mv0 mw6 f5 white roboto-light lh-copy">
<?php the_field('test'); ?>
<p class="f6 mv0 roboto-medium white link">
<?php the_title(); ?>
<p class="f6 mv0 roboto-light-i white link">
<?php the_field('subhead'); ?>
the lower part with the_title() and the_field('subhead') is displayed but the the_field('test') wont show up.
I set up the the_field(subhead) for posts and the_field for pages and template pages.