• Resolved kipj

    (@kipj)


    We are using store locator plug-in and would like to include the phone number in each of the search results, under the address – but i am struggling to find how to accomplish that. Please let me know if you have any suggestions.

    https://wordpress.org/plugins/wp-store-locator/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    If you open the /js/wpsl-gmap.js file, search for ‘function storeHtml( response, url )’

    Then near the bottom of that function you see it starts with this .

    html = "<li data-store-id='" + id + "'>

    If you scroll to the right you will see city, state, zip etc. You can add
    response.phone wherever you want and it will show the number.

    Thread Starter kipj

    (@kipj)

    worked perfectly, thanks

    BradC5372

    (@bradc5372)

    question: you say open the /js/wpsl-gmap.js file, where is this file located at so i can open it?

    Thread Starter kipj

    (@kipj)

    wordpress/wp-content/plugins/wp-store-locator/js/wpsl-gmap.js

    I was able to add the phone number to the wpsl-gmap.js file, but what happens when the plugin updates? How to make the number clickable?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    If you update, you loose the modifications.

    You can make phone numbers clickable by wrapping a link around it, this tutorial shows you how to do that. http://code.tutsplus.com/tutorials/mobile-web-quick-tip-phone-number-links–mobile-7667

    Yes, I know how to code a phone number to be clickable. Thanks.

    It seems this is a common request, so is it possible to add this feature to the next update so we don’t loose the modifications?

    Also, why is there an option to make the phone number clickable, yet I had to add custom code to make the phone number display in the search results?

    I’d also like to make the address clickable too. Another request for the next update! Thanks!

    I’d also like to make the address clickable too. Another request for the next update! Thanks!

    Plugin Author Tijmen Smit

    (@tijmensmit)

    The option says “Make the phone number clickable on mobile devices?“, and that is what it does, so not in desktop browsers.

    The next update will allow you to change the template, wrap links around whatever you want, and add custom data with the http://underscorejs.org/#template function through a filter, so you will never loose any modifications.

    Oh great – I look forward to the next update! Do you have a rough idea of when you’ll release that? My client is going to ask.

    I have the option checked for “Make the phone number clickable on mobile devices?” but it’s not clickable on my iPhone. I wonder if it’s because I manually added code for the phone number to show up. What is the correct way to have the phone number show in the location listing? I have phone numbers entered for all store locations, but they weren’t showing up until I added the code.

    Thnk you!

    I have added the code to add the phone number after the address in the search results. But when I use the recommended code to make the phone number clickable, WordPress is adding extra backslashes. Can you please let me know how to resolve this.

    The recommended code is;
    +1 (555) 555-5555

    The end result is;
    +1 (555) 555-5555

    Thank you.

    Whoops, here is the code without the link html

    The recommended code is;
    href=”tel://1-555-555-5555″>+1 (555) 555-5555

    The end result is;
    href=”\tel://1-555-555-5555\”>+1 (555) 555-5555

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Editing Search Results’ is closed to new replies.