I have a custom termonoloy, locations, that I want to add to the tooltip in the Month view.
I’m using this code to get the data and add it to single.event.php:
$additional_data = array();
$terms = get_the_terms( $post->ID, ‘geographies’);
if ( $terms && ! is_wp_error( $terms ) ) :
$location_links = array();
foreach ( $terms as $term ) {
$location_links[] = $term->name;
}
$locations = join( “, “, $location_links );
endif;
$additional_data[‘locations’] = $locations;
I’ve added this to tooltip.php:
[[=locations]]
And I get this error:
uncaught exception: TemplateError: ReferenceError: locations is not defined (on tribe_tmpl_tooltip line 18)
What am I missing? I’m testing this out in my local environment.
Thanks!