Question about GeoDirectory Experts addresses

This topic contains 11 replies, has 3 voices, and was last updated by  justmark 7 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #414482

    justmark
    Full Member
    Post count: 375

    Hi,

    What technique did you use to set up your GeoDirectory Experts directory addresses? I see they are geolocated by city/country but without a specific address. I am struggling to figure out how to set up my Services CPT the same way.

    Thank you.

    #414488

    Guust
    Moderator
    Post count: 29970

    The address parts are just hidden when displayed:
    https://wpgeodirectory.com/docs/changing-the-layout-of-addresses/

    Users just change the Street Address to anything they like after dragging the marker on the map.

    Thanks

    #414502

    justmark
    Full Member
    Post count: 375

    So we basically delete the fields we don’t want to see, correct?
    This can be done at the back end as well? I currently add all my listings.

    #414507

    justmark
    Full Member
    Post count: 375

    Also, I want this to apply to only one CPT who are basically consultants that work from home.

    #414547

    Guust
    Moderator
    Post count: 29970

    Users just change the Street Address to anything they like after dragging the marker on the map.

    Nothing is changed to the input process:
    1. Use any proper address or drag the marker on the map to lock in the lat and lng and the position of the marker.
    2. Change the street address to whatever you like, for example change “15 High Street” to “My Online Business”.
    3. Save the listing.

    It is nothing special or magic, it is default like that out of the box, both front and back end.

    I hope I am clearer now, let me know.

    #414611

    justmark
    Full Member
    Post count: 375

    If I make these code changes do they apply to all CPTs?

    #414629

    Kor
    Moderator
    Post count: 16516

    Hi Justmark,

    Yes, the code from this article https://wpgeodirectory.com/docs/changing-the-layout-of-addresses/ will affect all CPT’s. Let us know if you’ve further questions.

    Thanks!

    #414635

    justmark
    Full Member
    Post count: 375

    Hmmm. Ok let me think this through. It would probably make things less complicated but I am not sure if I want it to apply to all CPTs. Thank you.

    #414658

    Guust
    Moderator
    Post count: 29970

    You can hide using CSS per CPT, it will still be in the source code though.
    https://wpgeodirectory.com/docs/how-to-use-gd-without-street-addresses/

    Thanks

    #415781

    justmark
    Full Member
    Post count: 375

    @Kor

    I am trying out the code. So what do I do if I want to just show city and country as on GeoDirectory Experts? Do I delete:

    if($post->post_address){ $html .= ‘<span itemprop=”streetAddress”>’.$post->post_address.'</span>

    if($post->post_region){ $html .= ‘<span itemprop=”addressRegion”>’.$post->post_region.'</span>
    ‘;}
    if($post->post_zip){ $html .= ‘<span itemprop=”postalCode”>’.$post->post_zip.'</span>

    So it only shows the City and Country?

    #415812

    Guust
    Moderator
    Post count: 29970

    Yes, that seems right. There is no harm in trying, especially not in you use Code Snippets.
    But that will change for all CPTs as explained.

    Thanks

    #416332

    justmark
    Full Member
    Post count: 375

    This definitely works. I may just play with the styling now. Thanks!

Viewing 12 posts - 1 through 12 (of 12 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