Home › Forums › General Issues › get_field not returning value › Reply To: get_field not returning value
You said that you tried
$expirationtime = get_field("expiration", $post->ID);
If that does not work then there are only a few explanations for why ACF is returning no value.
1) The field does not exist on the post
2) The field has no value
3) The field name you’re trying to get is not the correct one
4) Some other filter somewhere is interfering with ACF getting the field and formatting the value. This last one can be difficult to track down.
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!
ACF wouldn’t be so widely used in WordPress if it didn’t have some pretty amazing capabilities. In this article, we look at a few of the features we’ll discuss during “7 things you didn’t know you could do with ACF” at #WPEDecode later this month. https://t.co/5lnsTxp81j pic.twitter.com/Yf0ThPG1QG— Advanced Custom Fields (@wp_acf) March 16, 2023
© 2023 Advanced Custom Fields.