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

#13875
Chris
Keymaster

Hi,

I did some testing on the code and found there was a missing ‘p’ in the filter name. It’s corrected in 2.40.8 – email me if you need that upgrade, or you can use the filter as ‘mapress_poi_iconid’.

Here’s another example that works for me (with 2.40.8):


function myiconid($iconid, $poi) {
	if ($poi->postid) {
		if (has_category('catka', $poi->postid))
			return 'blue-dot';
		if (has_category ('catb', $poi->postid))
			return 'purple-dot';
	}
	return $iconid;
}

add_filter('mappress_poi_iconid', 'myiconid', 10, 2);