Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Modify Info Window Contents for Posts Using Hook
add_filter('wpgmp_infowindow_post_message', 'wpgmp_infowindow_post_message',1,2 );
function wpgmp_infowindow_post_message($message,$map) {
global $post;
//This will apply for map id 1.
if( $post->ID == 1) {
$message = "<h1>{marker_title}</h1>";
if( $post->ID == 107) {
$message = "<h1>{marker_title}</h1><p>{marker_address}</p>";
return $message;

This comment has been minimized.

Copy link

commented Apr 16, 2019

where I put that code..?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.