Hello George,
Try the script below by adding it to the functions.php file of your theme.
function gmw_custom_add_location_meta_to_info_window( $output, $location, $args, $gmw ) {
if ( 'posts_locator' != $gmw['slug'] || empty( $location->location_meta ) ) {
return $output;
}
$output['location_meta'] = '<div class="gmw-location-meta-wrapper">';
$output['location_meta'] .= gmw_get_location_meta_list( $location );
$output['location_meta'] .= '</div>';
return $output;
}
add_filter( 'gmw_info_window_content', 'gmw_custom_add_location_meta_to_info_window', 50, 4 );
You will most likely need to apply some custom CSS styling to make the content look good.
let me know if this helps.
Thread Starter
George
(@quantum_leap)
Works perfectly, Eyal, thanks! Is there a more comprehensive list of hooks and functions apart from the docs? I couldn’t find the gmw_info_window_content that you used, inside the docs.
Also, is there a way to rearrange the order of the displayed meta fields?