Get Directions with Full Address?

This topic contains 10 replies, has 4 voices, and was last updated by  ny_mama_t 6 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #478771

    ny_mama_t
    Expired Member
    Post count: 42

    Hi folks,

    Rather than a get directions link that searches the coordinates, I would like to be able to search by the full address.

    In V1, I achieved this with a custom function, but that appears to no longer work.

    Is this possible with a custom function now, or is there any way I can output the address meta information so that it’s “merge-able” into a dynamic hyperlink?

    #478778

    ny_mama_t
    Expired Member
    Post count: 42
    This reply has been marked as private.
    #478784

    Guust
    Moderator
    Post count: 29970

    You mean other than the default “get directions” option, see image?

    Or the “GD > Get Directions” widget?

    #478853

    Alex Rollin
    Moderator
    Post count: 27815

    V1 snippets by and large will not work with V2.

    In many cases common snippets have been integrated into new features for GDV2.

    However, if you want something custom that isn’t available as a design element right now, you can get a new snippet (or have an old one updated) by a GD Expert here:
    https://geodirectoryexperts.com/

    To do it yourself you can see:
    https://wpgeodirectory.com/docs-v2/faq/customizing/

    In the case of what you want to do, one way to go about it is to add a new custom shortcode that would:
    1. Output the results of GD Post Address
    2. Insert that into a GD Post Badge
    3. Use a custom shortcode to insert that into the chosen template

    That requires a customization but is very much achievable and with less work than in V1.

    #478887

    ny_mama_t
    Expired Member
    Post count: 42

    Hi Alex,

    I don’t think I need to hire an expert for this. What would be helpful, however, is a list of the functions/hooks/etc (basically the codex) for V2. The support docs re: customization note that that’s forthcoming. When can we expect that?

    #478890

    ny_mama_t
    Expired Member
    Post count: 42

    Guust, yes — I don’t want to search Google Maps for longitude and latitude. I want to search by the inputted address fields.

    The outputted link would query for the address instead of lon/lat.

    #478891

    Alex Rollin
    Moderator
    Post count: 27815

    I will flag your question for the developers and they will let us know if there is an update.

    #478895

    ny_mama_t
    Expired Member
    Post count: 42

    Edit: Sorry! didn’t see your response before sending this one. Thanks for now— the codex would definitely help. At this point, I’m not sure how a hired expert would be able to do more without access to the codex.

    @alex you mention using GD Post Badge, but I don’t want to create a callout on the listings— apologies, but I’m not following. All I want to do is a create a simple link, which is literally the current GD > Get Directions shortcode BUT using the physical address instead of the coordinates. =\

    #478901

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    That widget should get an update soon to make it more customisable, for now the quickest way would be to copy the whole widget code and change the name and then add the address in instead of the file can be found here: https://github.com/AyeCode/geodirectory/blob/master/includes/widgets/class-geodir-widget-post-directions.php
    Just register the new class like you would a widget.

    Stiofan

    #478902

    ny_mama_t
    Expired Member
    Post count: 42

    Okay!

    @alex I looked at the post badge documentation and tried to add it two ways:
    – following the “Visit my Website” button instructions here: https://wpgeodirectory.com/docs-v2/faq/common-examples/#gd_post_badge
    – Using the GD > Post Badge widget, and using advanced settings to specify the link.

    Values for field key is address, field condition is not empty, Badge is Get Directions! and Link url is https://www.google.com/maps/search/%%input%%.

    It’s also set to Show on selected pages, GD Pages: Listing Detail Page

    I can’t get it to show up at all, and no errors are printed. Any chance you can take a look and tell me what I’m doing wrong here? I can send over login details if so.

    #478903

    ny_mama_t
    Expired Member
    Post count: 42

    thanks @stiofan – I’ll try that a little later.

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