Google map – editing the small info-box pop-up

Hello, would anyone know in what file can the info-box pop-up be edited? I'd like to replace the excerpt with a different custom field (phone & website, for example). Thanks.

Created: July 22, 2014 at 5:42 am
  • In: Directory Theme
  • Started by: MichaelMichael
  • 6 members left 18 comments
  • Last reply from: MichaelMichael

  • Michael
    July 22, 2014 at 5:43 am
  • Michael
    July 25, 2014 at 5:52 pm

    anyone knows?

  • Michael
    August 4, 2014 at 1:20 am


  • Errol
    August 4, 2014 at 1:25 am

    If no one else comes along to give you an answer I know “M” the map specialist will come along soon πŸ™‚

  • Anonymous
    August 4, 2014 at 6:06 pm

    On or around line 1207 wp-content/themes/DT/framework/ look for +pinfo+

    Basically you can put your own html styled box in between info: ‘ ‘,

    [code title=”1207″]info: ‘<div class=”wlt-marker-wrapper animated fadeInDown”><div class=”wlt-marker-title”> ‘+ ptitle +’</div> <div class=”wlt-marker-content”>’+pinfo+'<div class=”clearfix”></div><div class=”readmore”><?php echo $CORE->_e(array(‘button’,’40’,’flag_noedit’)); ?></div><div class=”clearfix”></div> <div class=”close” onClick=\’();\’><span class=”glyphicon glyphicon-remove”></span></div>’,[/code]

    You should note though, that this is a core file and updates will overwrite changes you make, so take notes somewhere.

  • Michael
    August 4, 2014 at 10:02 pm

    Even after removing everything past “info:” , the pop-up keeps displaying listing’ excerpt.

  • Anonymous
    August 5, 2014 at 7:27 am

    😳 I beg your pardon… the instructions above are for the home page map…

    The all listings or search results page would be:

    On or around line 16115 wp-content/themes/DT/framework/

    Look for ‘+ coord[4] +’…

    [code title=””] info: ‘<div class=”wlt-marker-wrapper animated fadeInDown”><div class=”wlt-marker-title”> ‘+ coord[3] +’</div> <div class=”wlt-marker-content”>’+ coord[4] +’…<div class=”clearfix”></div><div class=”readmore”><?php echo $CORE->_e(array(‘button’,’40’,’flag_noedit’)); ?></div><div class=”clearfix”></div> <div class=”close” onClick=\’();\’><span class=”glyphicon glyphicon-remove”></span></div>’, [/code]

    Same as above anything inside the info: ‘ ‘, would create a new styled popup.

  • Michael
    September 9, 2014 at 3:00 am

    @ M.

    Thank you very much for helping.

    Your first advice actually helped me to remove the “My location” pin and link from the map, which is great. πŸ™‚

    The second advice is correct, but I am not sure what to do with coord[4]. Tried to replace it with different custom field shortcodes (phone, address, website), it doesn’t seem to work. Have to leave it as it is for now.

  • Anonymous
    September 9, 2014 at 6:59 am

    To replace coord[4] with custom listing data, try this example…
    ‘+ coord[4] +’…
    Replace with:
    PH: <?php echo get_post_meta( get_the_ID(), ‘listing_phone_number’, true ); ?>

    The term listing_phone_number is based on the DB KEY for Phone Number: (see attached screenshot)

    PS: Sorry… I should have explained the above before…

  • Michael
    September 9, 2014 at 4:36 pm

    I tried it before, it displays regular text (such as PH:) , but it doesn’t display <?php echo.
    Tried different DB Keys, it doesn’t show any of them πŸ™

  • Anonymous
    September 9, 2014 at 5:06 pm

    It seemed to work fine for me… try this one (instead). If its still not working, please post back your edits.

    Put the php code below on the line before, info: ‘<div class=”wlt-marker-wra…..

    [code title=””]<?php
    $postid = get_the_ID();
    $custom_fields = get_post_custom($postid);
    $phone_number = $custom_fields[‘listing_phone_number’]; // DB KEY

    Edit the info line : + coord[4] + so it looks like this:

    ….tent”>PH: <?php echo $phone_number[0]; ?><div class=”cle….

  • Michael
    September 9, 2014 at 6:13 pm

    This solution works. Should be in the PremiumPress Manual πŸ™‚

    Thank you very much, M. ! πŸ™‚

  • Anonymous
    September 10, 2014 at 6:49 am

    Your welcome…

    Emm the first shorter code does work… my code example above has apostrophe’s:

    PH: <?php echo get_post_meta( get_the_ID(), β€˜listing_phone_number’, true ); ?>

    It should have had quotation marks around the DB KEY
    PH: <?php echo get_post_meta( get_the_ID(), “listing_phone_number“, true ); ?>

    So sorry about that… 😳

  • Amy
    December 3, 2014 at 3:34 am

    @ M thank you for this post and you map expert-ness!

    I am also looking to adjust the map pop ups on the search results page.

    There are 3 specific things I need changed, but my needs are a bit different than the original posters on this thread in that I don’t need to change the content in the pop up, just need fix some styling issues.

    I’ve tried to figure it out myself with this threads guidance but I am at a dead end, it’s driving me bonkers, lol.

    I have started a new thread that has a photo showing exactly what I need… maybe if you get a minute you could take a look:
    Styling the Google Map pop-ups on Search Results page

Viewing 15 posts - 1 through 15 (of 19 total)