custom markers code doesn′t work
-
put the code on the theme’s function.php but doesn’t show anything, the markers are there but the image is missing
function setBGMPDefaultIconByCategory( $iconURL, $placemarkID ) { $placemarkCategories = wp_get_object_terms( $placemarkID, 'bgmp-category' ); foreach( $placemarkCategories as $pc ) { switch( $pc->slug ) { case 'arreglo-calles': $iconURL = get_bloginfo( 'stylesheet_directory' ) . 'https://salvemosvidas.com/wp-content/uploads/2020/01/arr.png'; break; case 'limpieza': $iconURL = get_bloginfo( 'stylesheet_directory' ) . 'https://salvemosvidas.com/wp-content/uploads/2020/01/lim.png'; break; case 'semaforos': $iconURL = get_bloginfo( 'stylesheet_directory' ) . 'https://salvemosvidas.com/wp-content/uploads/2020/01/sem.png'; break; default: $iconURL = get_bloginfo( 'stylesheet_directory' ) . 'https://salvemosvidas.com/wp-content/plugins/basic-google-maps-placemarks/images/default-marker.png'; break; } } return $iconURL; } add_filter( 'bgmp_default-icon', 'setBGMPDefaultIconByCategory', 10, 2 );
what am i doing wrong?
thanks in advance, awesome plugin
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘custom markers code doesn′t work’ is closed to new replies.