Mashup map > markers are the post image
-
Dear,
Outstanding plugin!
I am trying to change the markers on a mashup map with the image of each post. The image field is a custom field. And I have two custom post types (A and B).
The image field for post type A is pro_thumb and for custom post type B it is the avatar of the author of the post.
I tried with following code`function prefix_pronamic_google_maps_marker_options_icon( $url ) {
switch ( get_post_type() ) {
case ‘A’:
$im = get_post_meta( get_the_ID (), ‘pro_thumb’, true );
return $im;
case ‘B’:
$authorid = get_the_author_meta( ‘ID’ );
return get_avatar( get_the_author_meta( ‘ID’ ), 60 );
}
return $url;
}
add_filter( ‘pronamic_google_maps_marker_options_icon’, ‘prefix_pronamic_google_maps_marker_options_icon’ );
`
All images are png.
Can you tell me how to fix this?
- The topic ‘Mashup map > markers are the post image’ is closed to new replies.