You entered it, but it isn’t on the site—this is the single most common stumble with ACF (SCF). The causes come in a fairly fixed order of likelihood, so working down the list from the top narrows most cases down in a few minutes.
First, narrow it down: is the value missing, or is the output missing?
Rather than hunting for a cause right away, it’s faster to decide which side the problem is on. Temporarily drop this in where you want the value to appear.
<?php var_dump(get_field('price')); ?>- You get
bool(false)orNULL→ the value isn’t coming through. Check 1–5 - The value prints, but nothing changes on the page → it’s an output problem. Check 6–8
- Even the
var_dumpresult doesn’t appear → this file isn’t being used. Check 9
1. The wrong field name (most common)
What you pass to get_field() is the field name (alphanumeric), not the label you see in the admin screen. Check the name printed in small text under the label in the “Field Groups” list.
- ❌
get_field('Price') - ✅
get_field('price')
Underscore-versus-hyphen mixups (event_date / event-date) and a trailing space are common traps too.
2. Mixing up inside and outside the loop
get_field('price') fetches “the value of the current post.” So outside the loop—in the sidebar, the footer, an archive heading—there’s no current post, and you get nothing. Pass a post ID as the second argument.
<?php echo esc_html(get_field('price', 123)); ?> <!-- specify a post ID -->
<?php echo esc_html(get_field('price', $post->ID)); ?> <!-- from a variable -->
<?php echo esc_html(get_field('site_tel', 'option')); ?> <!-- a value from an options page -->For values on a term or a static page, name the target explicitly, as in get_field('name', 'category_5') or get_field('name', get_option('page_for_posts')).
3. Using get_field inside a repeater or group
Inside a repeater field or a group, there are dedicated functions. Get this wrong and you quietly get nothing, even with the right name.
<?php while (have_rows('faq')) : the_row(); ?>
<?php the_sub_field('question'); ?> <!-- ✅ the sub version -->
<?php the_field('question'); ?> <!-- ❌ comes back empty -->
<?php endwhile; ?>For a group it’s open the box, then the contents, as in get_field('company')['tel'].
4. The field group’s “location” rules don’t match
A field group has rules for where it appears (post type, template, taxonomy and so on). If those don’t match your target, the input fields never appear—which means no value was ever saved.
Start by looking at the editing screen to confirm the fields are visible. If they aren’t, revisit “Settings” → “Location” (the display rules) on the field group.
5. The plugin is inactive, or missing on that environment
If everything vanished after you uploaded to production, this is it. You moved the theme code but never activated the plugin—get_field() doesn’t exist, so you get an error or nothing.
<?php if (function_exists('get_field')) : ?>
<?php the_field('price'); ?>
<?php endif; ?>Wrapping it in function_exists() stops the whole site from going down when the plugin is deactivated. It’s an especially worthwhile habit in themes you distribute or hand over.
6. You’re trying to print an array (you see “Array”)
Checkbox, link, group and repeater fields—and image fields whose return value is set to “Image Array”—are arrays. the_field() can’t print them directly.
<?php $link = get_field('button'); ?>
<a href="<?php echo esc_url($link['url']); ?>"><?php echo esc_html($link['title']); ?></a>TipsACF field types: a cheat sheet for displaying each oneThe cheat sheet tells you what each field type returns7. Tripping over “0” and empty strings
if (get_field('stock')) treats a value of 0 as “not there” as well. When you want to show zero stock or “$0,” compare explicitly.
<?php $stock = get_field('stock'); ?>
<?php if ($stock !== '' && $stock !== null) : ?>
<p>In stock: <?php echo esc_html($stock); ?></p>
<?php endif; ?>8. Forgetting to clean up after a sub-loop
After looping through other posts with WP_Query or the_post(), forgetting wp_reset_postdata() leaves later get_field() calls pointing at a different post. When “only the values below the list are wrong,” suspect this.
<?php $q = new WP_Query(['posts_per_page' => 3]); ?>
<?php while ($q->have_posts()) : $q->the_post(); ?>
<?php the_title(); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?> <!-- ← this one -->TipsHow to fetch posts outside the loop (WP_Query)How to write a sub-loop properly, and how to clean up after it9. That template file isn’t being used
The pattern where the file you’re editing isn’t actually responsible for the page. Putting a marker at the top is the reliable way to check.
<?php echo '★single.php'; ?>If that doesn’t appear on the page, a different file in the template hierarchy (single-shohin.php, page-about.php, index.php and so on) is being used. Work out which file it is from your theme’s structure and the type of URL.
10. Something is cached
A caching plugin, server-side cache or CDN may be serving old HTML. Opening the page in a private window, or clearing the cache, tells you. Two classic signs: it shows in the admin but not on the site, and you fixed it but nothing changed.
Summary
- Start with
var_dump(get_field('name'))to decide whether the value is missing or the output is - If the value is missing, check five things: field name, post ID, the sub functions, location rules, the plugin
- If the output is missing, check three: arrays, testing for 0,
wp_reset_postdata() - If nothing at all appears, suspect that the template isn’t being used—or a cache
Work down the list and you’ll catch it somewhere. Narrowing it down beats guessing at fixes every time.