Skip Navigation

[Résolu] Best way to deal with Country > County taxonomy

This support ticket is created Il y a 6 années et 10 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 réponses, has 2 voix.

Last updated by Luo Yang Il y a 6 années et 10 mois.

Assigned support staff: Luo Yang.

Auteur
Publications
#362513

Hello,

2 questions please:

I have built a new site based on the "Classifieds" reference site, and it has very quickly become popular with over 100 user submitted listings in the first three days.
I had modified the Locations taxonomy for the listings so that it contained UK as a top level country, England, Wales, Scotland etc as children within the UK. Within each of those three, I have included all of the various counties. So the list has become quite long!

As I said, the site has become popular very quickly and I am getting requests from people all over the planet to add their data. Clearly I do not want to end up with one massive select list containing all of the countries, and all their sub-regions (states/counties etc).

The only reason I want to retain this data is so that the user can filter broadly on their local region.

I am assuming it's possible to break up the countries and counties into separate lists, so that if you were entering a listing for England, the next select list would adjust to only show the English counties, and so on.

Question 1:
What is the best way to set this up, bearing in mind that it's within the Classifieds reference site so the CRED forms would also need to reflect the changes. (I'm only using the "ad a free listing" at this stage)

To make the situation slightly more interesting, I am using the new Toolset Maps plugin for people to try to pinpoint an exact location (I'm looking forward to version 1.1). As we know there is a big bug with this right now, so I'm directing people to just input the postcode, which is usually close enough.
I've made an additional view that plots all of the listings on one large map, and this is very popular.

Whilst people can quickly zoom the map to their area, I do want to keep the separate country/county field for the front end parametric search too.

Question 2: Is it possible to populate the country and county fields automatically based on the user's input into the google map address field? In this way, the country/county fields could be hidden presumably, so there would be fewer input boxes in the form - always a good thing!

Many thanks
Alan

#362981

Luo Yang
Supporter

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Dear Alan,

Unfortunately, both your requests are not available with CRED + Toolset maps, and I put them into our to-do list as feature requests, our developers will take care of it, but there isn't any ETA for it.

Currently, I suggest you contact our certified partners for it:
https://toolset.com/consultant/

#363657

Thank you Luoy

One last thing then, I'm aware that that new address field recorded by Toolset maps actually records the lat / long figures.

If I want to try experimenting with javascript for the reverse geo-coding (e.g. there is something called nominatim that can do this - hidden link), how would I need to reference the lat/long data ?

thanks
Alan

#363868

Luo Yang
Supporter

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

If you need reverse the address from lantitude and lat/long data to address, you can setup them directly in shortcode [wpv-map-marker] as attribute "lat" and "lon", for example:

[wpv-map-marker map_id="map-1" marker_id="marker-1" lat="12" lon="34"][/wpv-map-marker]