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
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?
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!
The ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 29, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.