Support » Plugin: GEO my WordPress » Add Google maps link to address

  • Hi, Is there any way to make the address below the map clickable and to make it open a link?.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am also looking for these sorts of customisations.

    I am assuming that if we could use a custom template for the single location shortcode that would do the trick but there does not seem to be a way to use custom templates for single locations? Or Am I missing something?

    Plugin Author Eyal Fitoussi

    (@ninjew)

    Hi,

    That’s a good idea. I just applied it to the new version of GEO my WP which I am currently working on and should be available in a few days.

    If you need a solution at this moment you can use the script below:

    
    function gmw_sl_custom_link_address_to_google_map( $output, $address, $args ) {
    
    	$address = esc_attr( stripslashes( $address ) );
    
    	return '<div class="gmw-sl-address gmw-sl-element"><i class="gmw-location-icon gmw-icon-location"></i><span class="address"><a href="https://maps.google.com/?q=' . $address . '" target="_blank">' . $address . '</a></span></div>';
    
    	return $output;
    }
    add_filter( 'gmw_sl_address', 'gmw_sl_custom_link_address_to_google_map', 50, 3 );
    

    I hope this helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add Google maps link to address’ is closed to new replies.