Get Directions with Full Address?
This topic contains 10 replies, has 4 voices, and was last updated by ny_mama_t 6 years, 6 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
April 6, 2019 at 1:05 am #478771
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?
April 6, 2019 at 2:11 am #478778This reply has been marked as private.April 6, 2019 at 3:39 am #478784You mean other than the default “get directions” option, see image?
Or the “GD > Get Directions” widget?
April 6, 2019 at 11:53 am #478853V1 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 templateThat requires a customization but is very much achievable and with less work than in V1.
April 6, 2019 at 1:01 pm #478887Hi 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?
April 6, 2019 at 1:03 pm #478890Guust, 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.
April 6, 2019 at 1:03 pm #478891I will flag your question for the developers and they will let us know if there is an update.
April 6, 2019 at 1:10 pm #478895Edit: 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. =\
April 6, 2019 at 1:38 pm #478901Hello,
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
April 6, 2019 at 1:41 pm #478902Okay!
@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.
April 6, 2019 at 1:41 pm #478903 -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket