• Resolved Viko885

    (@viko885)


    Hi Eyal,

    Is there any way I can change markers on the map based on the post category? That would be very helpful. For example posts that belong to “Restaurants” category would have fork & knife in the marker and “Hotels” maybe a bed icon, you get the idea.

    Do you have any filter that can do that?

    https://wordpress.org/plugins/geo-my-wp/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Eyal Fitoussi

    (@ninjew)

    Hi,
    Yes, there is a filter which allows you to modify the map Icons,

    The filter below can be found in geo-my-wp/plugins/posts/includes/gmw-pt-search-query-class.php ( line 306 ).

    apply_filters( 'gmw_pt_map_icon', 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld='.$post->post_count.'|FF776B|000000', $post, $this->form );

    You will need to create a function that will check for the categort attached to the $post and based on that modify the icon.

    Thread Starter Viko885

    (@viko885)

    Thank you so much. I’ll have a go at it today and will post back the results.

    fb-creations

    (@fb-creations)

    Hi, i know this post has been created for a while, but i would get an exemple of this function, and i guess i’m not lonely.

    So please, could you publish it soon ?

    Thank you in advance

    Hi, i would get an example to please.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Change map markers based on post category’ is closed to new replies.