Home › Forums › Backend Issues (wp-admin) › Post object field not showing past Tribe Events Calendar events › Reply To: Post object field not showing past Tribe Events Calendar events
My code works with current events.
$myfield= get_field('myfield');
$myfield_ID = $myfield->ID;
echo $myfield_ID;
It returns event ID with current events but with past events it returns me nothing, none ID…
With ID, I can display event linked by acf post object title, thumbnail, etc… but without, impossible to display anything from a past event.
If I replace manually the ID variable (ex: $myfield_ID = ‘4055’;) it displays the past event.
I dont understand why it doesn’t returns me the ID, even if it’s a past event.
Any help appreciated.
Best.
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.