Skip Navigation

[Resolved] Create a search on an archive page for one element of a maps address

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/Karachi (GMT+05:00)

Author
Posts
#2628879

Tell us what you are trying to do.

I am using the Maps Block on an archive page.
For example, I have a directory for "Choruses."
One of the search fields is "City," and another is "State."
I want input in the search field for City to pull up on the map all Choruses in that city.

Is there any documentation that you are following?
I can't find any that addresses this issue.

Is there a similar example that we can see?

What is the link to your site?
hidden link

#2629055

Hi,

Thank you for contacting us and I'd be happy to assist.

If your goal is to add a location-based search, where results falling within the set radius of a location or city are shown, it is not supported in the archives.

For a feature like this, you'll need to create a separate page with a Toolset view:
https://toolset.com/lesson-placement/lesson-placements-1622939-1161360/

regards,
Waqar

#2629087

I don't want to filter by distance. I want a user to be able to search for the state of Texas and see all of the choruses in that state - or - look for the city of Philadelphia and see all the choruses in that city. If all filters are cleared, they could see all the choruses everywhere on the map. Does that make sense? Thanks in advance for your help.

#2629935

Thanks for writing back.

If the 'choruses' post type has the 'city' and 'state' information stored with them in the form of a custom field or a taxonomy, then you'll be able to add a search field for each of them in the archive, as explained here:
https://toolset.com/lesson-placement/lesson-placements-1621271-1622285/#add-a-custom-search-to-an-archive

In case, you're not seeing the option to use them for the search, I'll need to see how this archive is set up in the admin area. You're welcome to share temporary admin login details, along with the link to the archive page.

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

#2630337

Thank you for sharing these details.

Based on the information you've shared, I can see inconsistency with the 'Dallas' search.

But, I couldn't access the admin area, as it shows the 'username doesn't exist message.

Can you please check the username and password again? I'm setting the next reply as private.

#2631463

Hi Kim,

Thank you for sharing these details.

During troubleshooting, I noticed that there were two custom fields with the name 'Chorus City'.
( screenshot: hidden link )

One with the slug 'chorus-city' and the other with the slug 'chorus-city-location'. The one with the 'chorus-city-location' is currently in use to store the city field's data.

In the archive 'All Choruses', I removed the 'Custom Search Filter' block for this field and added it again, for the correct field and the filter is working now.
( screenshot: hidden link )

regards,
Waqar