Home › Forums › Front-end Issues › CPT Loop not returning get_field but does get_post_meta › Reply To: CPT Loop not returning get_field but does get_post_meta
Hi @Idealien
Thanks for posting your last snippet of code. This shows that the issue is not related to your loop at all, there is something else going on.
Can you please debug the returned value like so:
<?php
echo '<pre>';
var_dump(get_field('highlight_call_to_action', 64) );
echo '</pre>';
die;
?>
What result do you get?
Can you also check your DB and make sure that for post_id = 64, there is a row in your wp_postmeta table which contains the highlight_call_to_action value?
What does it look like? Does it also have a ‘reference value’ below it in the table (underscore version)? Screenshot?
Thanks
E
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.