Why is variable that get_post_meta stored in empty?
The variable that get_post_meta was stored in was empty because I wasn’t getting an id. I was trying to use this code on a category page, not a single event. Without an id it couldn’t identify the post_meta to use. So I corrected it with the following: $latest_cpt = get_posts(“post_type=event&numberposts=1”); $theidone =$latest_cpt[0]->ID; $this_post_id = $theidone; … Read more