Reply To: customizing POI when map generated by custom fields

Home Forums MapPress Support customizing POI when map generated by custom fields Reply To: customizing POI when map generated by custom fields

#13874
Chris
Keymaster

    Hi,

    For the body you’ll need to modify template file map_poi.php, which is much like editing a WordPress template file. For the icons you’ll need to use a filter ‘mappress_poi_iconid’:
    http://codex.wordpress.org/Function_Reference/add_filter

    Here’s a sample filter based on two categories. You will need an update to 2.40.8 before using it – email me for the update:

    
    function myiconid($iconid, $poi) {
    	if ($poi->postid) {
    		if (has_category('cata', $poi->postid))
    			return 'blue-dot';
    		if (has_category ('catb', $poi->postid))
    			return 'purple-dot';
    	}
    	return $iconid;
    }
    
    add_filter('mappress_poi_iconid', 'myiconid', 10, 2);