Reply To: Add Icon to the [mappress] short code

Home Forums MapPress Support Add Icon to the [mappress] short code Reply To: Add Icon to the [mappress] short code

#17916
Foster
Participant

I got the icon to work using the extension. I’m using pods, so I had to use this section of PHP to make it fly.

function my_meta_update($meta_id, $object_id, $meta_key, $meta_value) {

if ( ‘city’ === $meta_key ||
‘state’ === $meta_key ||
‘street’ === $meta_key ||
‘zipcode’ === $meta_key ||
‘map_icon’ === $meta_key )
do_action(‘mappress_update_meta’, $object_id);
}

add_action(‘added_post_meta’, ‘my_meta_update’, 10, 4);
add_action(‘updated_post_meta’, ‘my_meta_update’, 10, 4);
add_action(‘deleted_post_meta’, ‘my_meta_update’, 10, 4)

Thanks!
Foster