Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #1008084

    we are working on a multi-themed site, logo and colors are changein in relation to accsesing url.

    im looking for a way to change the maps custom marker image to change it accordingly to the accsesing url

    thanks for your effords and sorry for bad englisch

    • This topic was modified 5 years, 10 months ago by heiniheini.

    alternatively, if you can point me to a filter to change the custom marker image url programmaticly that would also be absolutly fine




    You can use this code to overwrite the marker programmatically:

    add_filter('shortcode_atts_av_google_map', 'avf_shortcode_atts_av_google_map', 10, 4);
    function avf_shortcode_atts_av_google_map($out, $pairs, $atts, $shortcode) {
    	$out['content'][0]['attr']['marker'] = 2759;
    	return $out;

    0 is the number of the first map. If you’ve i.e. two maps you could use this code to change the marker of the second map:

    $out['content'][1]['attr']['marker'] = 2759;

    2759 is the number of the attachment id. You need to replace it with the id of an attachment which is saved on your server.

    Best regards,

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.