I’m using the following code in “functions.php” to include a link to Google Maps on the individual listing page.
// Google Maps link
add_action(‘geodir_after_social_sharing_buttons’ , ‘buttonmap’, 10);
function buttonmap(){
global $post, $wp_query, $preview, $geodirectory;
$postid = $wp_query->post->ID;
$address= geodir_get_post_meta($postid,’post_address’,true); //address
$e_add = str_replace(‘ ‘, ‘+’, $address); // + in space eg road+street+23
$lat= geodir_get_post_meta($postid,’post_latitude’,true); //lat
$lon= geodir_get_post_meta($postid,’post_longitude’,true); //lon
//echo $e_add.$lat.$lon;
echo “ <br />SHOW IN GOOGLE MAPS<br />“;
}
// End Google Maps link
However, I would like to replace the text “SHOW IN GOOGLE MAPS” with an icon (show_in_google_maps.png)
Can I get some help with the code please?
Also: where should upload the png file to?
Thanks!