Sauter la navigation

[Résolu] Location Filter Problems

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: I am trying to use a distance filter in a WordPress Archive but it does not seem to be working.

Solution: Distance filters in WordPress Archives are not currently functional. We hope to fully support this feature in an upcoming release, but for now, the best approach is to create a View with a distance filter and insert it in a WordPress Archive. Remove everything in the wpv-loop tags of the Wordpress Archive's Loop Output editor.

0% of people find this useful.

This support ticket is created Il y a 6 années et 7 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Ce sujet contient 22 réponses, a 2 voix.

Dernière mise à jour par Christian Cox Il y a 6 années et 7 mois.

Assisté par: Christian Cox.

Auteur
Publications
#872965
Screen Shot 2018-05-10 at 11.50.07 AM.png

It may be possible to use the posts_where, posts_join, and posts_orderby filters to modify a WP search query, but let's exhaust all options with Relevanssi first. I turned Relevanssi on and modified the text search Query Filter as shown in the attached screenshot. It looks like even though you tell Relevanssi to index the terms in Relevanssi settings, the Query Filter option here must be updated to search title, body and custom fields. The option doesn't mention terms, but it seems to be respecting the searches I enter like this one for labrador:
lien caché

Can you check again and let me know your thoughts?

#873263

If you reduce your search radius to 30mi (or rather, any value less than 148mi), the post titled "Midnight" should not show up, as the distance between Harborcreek, PA and Pittsburgh, PA is ~148 miles.

lien caché

As you can see from the results, Midnight still shows up, even when the radius limit is 30 miles, and even after I decided to test extremes by setting the value to Midnight's address field to the Eiffel Tower's location in Paris, France.

#873837

Okay thanks. I'm going to escalate this to my 2nd tier support team for further investigation, because it appears that Relevanssi and the distance filter are not working together correctly in text searches. Please stand by and I will update you as soon as I have more information to share.

#876670

Thanks, Christian!

#880722

Here's the information I received. The integration between Toolset text search and Relevanssi is officially limited to custom fields, post title, and post content, as described in the documentation here: https://toolset.com/documentation/user-guides/searching-texts-custom-fields-views-relevanssi/

However, it does seem to work in some cases. We will discuss the issue with our developers to see what can be possible here, but since we're close to a launch of a major release, the Release Candidate is the main priority of the team.

#883554

So, is there a way to make it work without Relevanssi? Is there something we can do programmatically that'll allow the text search to also look into taxonomy terms?

From my understanding, Relevanssi is the official supported search mechanism for Toolset. Isn't it a rather large oversight for it not to support one of Toolset's core features?

Right now, I am quickly reaching a deadline, and the expectation of a location based search is the primary function of this site. I simply cannot afford to wait for official implementation at this time, isn't there a way we can find a solution for this? Do you know of any other search plugins that might be of use?

#898530

I have found a solution to my problem. Perhaps this problem should be addressed in later releases, however for the time being, I found the plugin WP Extended Search to fulfill my needs. https://wordpress.org/plugins/wp-extended-search/

It allows me to select what taxonomy terms and meta fields I wish to specifically search in, while not interfering with the distance filtering feature provided by Toolset.

Thanks for your help, anyway.

#906817

FYI our developers plan to release a fix for the Relevanssi text search and distance filters compatibility issue in Maps 1.5.