Hey,
I have a custom query and trying to grab the coordinates of the venue associated with each event.
Here’s a snippet of what my code looks like:
$events = tribe_get_events( array(
'posts_per_page' => 12,
'start_date' => current_time( 'Y-m-d' ),
) );
foreach ( $events as $post ) : setup_postdata( $post );
$venue = tribe_get_venue_id($post->ID);
print_r( tribe_get_coordinates( $venue ) );
endforeach;
The array being returned has the ‘lat’ and ‘long’ keys but the values are “0”.
Array ( [lat] => 0 [lng] => 0 )
Any ideas here?