
Before the WP update, all of my custom fields showed for my custom post types. Now, the email field won’t show, but it shows in the HTML inspector. Here is my code:
<div class="row">
<?php
$abateOfficers = new WP_Query(array(
'posts_per_page' => -1,
'post_type' => 'officer'
));
while($abateOfficers->have_posts()) {
$abateOfficers->the_post();
?>
<div class="col-md-4">
<div class="card border-dark mb-3 text-center">
<div class="card-header">
<p class="card-name"><?php the_title(); ?></p>
</div>
<div class="card-body text-dark">
<h5 class="card-title"><?php the_field('name'); ?></h5>
<?php
if (get_field('email', get_the_ID())) { ?>
<h5><a class="email" href="<?php the_field('email'); ?>"><br>
<i class="far fa-envelope"></i>
</a></h5>
<?php } ?>
</div>
</div>
</div>
<?php } ?>
</div>
I have tried it with the if statement and without and it won’t show either way. The title field is showing just fine though. I’m not sure if this a Gutenberg issue. I installed the classic editor plugin to see if it would show then, but it still doesn’t. Any ideas? Please let me know if I need to include more information.
Turns out I wasn’t using the latest version of FontAwesome. Silly mistake.