Reply To: Custom Icon Per Term

Home Forums MapPress Support Custom Icon Per Term Reply To: Custom Icon Per Term

#15383
Rainmaster
Participant

    Hey Chris,

    I have it working now. Your code would have worked but when I copied it over the apostrophes were the old left-right type so I typed over them and works great now.

    Thank you!

    +++++++++

    * For anyone interested here is the code for custom icons I am using…

    function myiconid($iconid, $poi) {
    global $post;
    $postid = ($poi->postid) ? $poi->postid : $post->ID;

    if (has_term(‘custom-taxonomy’, ‘custom-post-type’, $postid))
    return ‘custom-map-icon.png’;

    return $iconid;
    }
    add_filter(‘mappress_poi_iconid’, ‘myiconid’, 10, 2);

    * Icons loaded up to the “icons” folder somewhere within the “uploads” folder.