I looked in wp_post meta and found some ACF field entries, so the data appears to be intact.
Also, my theme uses an if(get_field()) to conditionally display the ACF content, including static headers.
The weird thing is that the headers are displaying (so get_field must be resolving as true), and yet none of the content actually shows up. Here’s a code snippet:
<?php if(get_field('lot')): ?>
<h2>Pricing</h2>
<table>
<tr cellpadding="10">
<th>BLK</th>
<th>Lot</th>
<th><?php the_field('lot_type'); ?></th>
<th><?php the_field('lot_pricebuilder'); ?></th>
<th>Avail</th>
<?php if (get_field('lot_expiry') == "True") {
echo "<th>Expiry</th>";
}?>
</tr>
<?php while(the_repeater_field('lot')): ?>
<?php $sold = get_sub_field('lot_availability');?>
<tr <?php echo "class="; the_sub_field('lot_availability');?>>
<td><?php the_sub_field('lot_block'); ?></td>
<td><?php the_sub_field('lot_number'); ?></td>
<td><?php the_sub_field('lot_size'); ?></td>
<td>
<?php if (get_field('lot_pricebuilder') == "Builder") {
if (get_sub_field('lot_builder') == "null") {
echo " ";
} else {
the_sub_field('lot_builder');
}
} elseif (get_field('lot_pricebuilder') == "Price") {
if ($sold == "Sold") {
echo "-";
} else {
the_sub_field('lot_price');
}
}
?>
</td>
<td>
<?php $avail = get_sub_field('lot_availability'); if ($avail == 'null' ) { } elseif ($avail) { echo $avail; } ?>
</td>
<?php if (get_field('lot_expiry') == "True") {
echo "<td><span style=font-size:11px>";
the_sub_field('lot_expirydate');
echo "</span></td>";
}?>
</tr>
<?php endwhile; ?>
<?php endif; ?>
and yet it renders out as:
I suspect that the database didn’t upgrade properly. Is there a way to check if ACF is using the new or old database structure?
I may be experiencing a similar issue. I was using a repeater, and its contents appear to be gone in the admin UI. I can still see some stuff in the actual SQL tables though
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.