Display Phone Number

This topic contains 3 replies, has 2 voices, and was last updated by  CTHthemes 1 week, 1 day ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28563

    craigtimblin
    Participant

    Supported

    Hi,
    I would like the phone number to display in the map listings like it does if you click on the map pin.
    Where do I edit for this to happen?

    Attachments:
    You must be logged in to view attached files.
    #28588

    CTHthemes
    Keymaster

    You have to edit .php files:
    http://prntscr.com/m2wcsg
    and this for ajax loading template: http://prntscr.com/m2wd7p

    #28626

    craigtimblin
    Participant

    Supported

    I don’t get what I am editing on the second image. I have copied the code for the phone number form the pop up map and this hasn’t worked. Can you give me an idea of what I am editing to make the number show up please.

    #28657

    CTHthemes
    Keymaster

    Here is for ajax loading preview: http://prntscr.com/m3z3pe

    
    <# if(listing.phone){ #> 
                    <span class="map-popup-contact-infos infos-phone"> 
                        <i class="fa fa-phone" aria-hidden="true"></i><a href="tel:{{listing.phone}}">{{{listing.phone}}}</a> 
                    </span> 
                    <# } #>  
    
    

    and this for first loading: http://prntscr.com/m3z4mw

    
    <?php $phone = get_post_meta( get_the_ID(), '_cth_contact_infos_phone', true ); 
                if($phone != ''): ?>
                    <span class="map-popup-contact-infos infos-phone"> 
                        <i class="fa fa-phone" aria-hidden="true"></i><a href="tel:<?php echo $phone; ?>"><?php echo $phone; ?></a> 
                    </span> 
                <?php endif; ?>
    
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

CityBook 1.3.1 - Native Mobile Apps is now availableGet it
+