I have 4 custom fields: date, topic, place, and state. I want to display value of these fields in my front-page.php (home). But it’s not display anything.
I followed some tutorials. Since I’m just a beginner programmer, I don’t really know the problem.
Here is my code:
<table>
<tr><th colspan="4">ISO Training</th></tr>
<tr> <th>Date</th> <th>Topic</th> <th>Place</th> <th>State</th> </tr>
<?php while(have_posts()) : the_post(); ?>
<tr>
<td width="8%"><?php echo the_field('date'); ?></td>
<td width="50%"><?php echo the_field('topic'); ?></td>
<td width="25%"><?php echo the_field('place'); ?></td>
<td width="17%"><?php echo the_field('state'); ?></td>
</tr>
<?php endwhile; ?>
</table>
Probably its not correct query (while…). Does it shows for example the_title(); ? Maybe the problem is not with acf 🙂