Getting location name from “_location_id” post meta
-
Hi all,
I’m using this events manager for the first time and am trying to get the event location name from the post meta, I’ve been able to get everything else such as the event start date/end date, start time/end time, however the only thing the plugin returns in terms of a location is a single integer value. I assumed this was a post ID but that isn’t the case, is there a helper function or anything that the plugin uses to parse this value?
I’ve tried something along the lines of these, both of which return nothing:
get_post($post_meta['_location_id'][0]);
get_posts(array( 'post_type' => 'location', 'post__in' => array((int) $post_meta['_location_id'][0]) ));
Any ideas would be greatly appreciated 🙂
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Getting location name from “_location_id” post meta’ is closed to new replies.