Reply To: Icons per status/custom fields/taxonomy

Home Forums Feature Requests Icons per status/custom fields/taxonomy Reply To: Icons per status/custom fields/taxonomy

#11889
Chris
Keymaster

Hi,

There are two filters for this. ‘mappress_map_display’ is called just before the whole map is displayed, and ‘mappress_poi_iconid’ is called when preparing each poi for display.

Here’s an example using the second filter. It sets posts with category ‘mycat1’ to iconid ‘blue-dot’, all other posts are unchanged.  The code could be added your function.php file:

function myiconid($iconid, $poi) {
if ($poi->postid && has_category('mycat1', $poi->postid))
return 'blue-dot';
else
return $iconid;
}
add_action('mappress_poi_iconid', myiconid);