Adding icon to functions.php

This topic contains 1 reply, has 2 voices, and was last updated by  Guust 8 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #245965

    cfigueroa
    Expired Member
    Post count: 15

    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!

    #245980

    Guust
    Moderator
    Post count: 29970
    <br/><img src="URL of your image"><br/>

    Should do it.
    Upload the image using your media settings and take note of the URL.

Viewing 2 posts - 1 through 2 (of 2 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount