Skip Navigation

[Resolved] Show Posts from current location

This support ticket is created 6 years, 1 month ago. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 9 replies, has 2 voices.

Last updated by Nigel 5 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#1146682

Tell us what you are trying to do?

I am trying to display posts which are 5 km from current user location ([wpv-geolocation]) with views using custom field location, field type address.

I followed steps mentioned in https://toolset.com/forums/topic/sorting-views-by-distance-to-current-post-geolocation/

but does not work

Is there any documentation that you are following?
https://toolset.com/forums/topic/sorting-views-by-distance-to-current-post-geolocation/

#1147085

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

Can you be more specific about what does not work?

How far did you get? What do you see?

#1151113

Hello

created post type listings
created custom field address field type address
added 2 posts in post type listings in address field selected use my location.
created view named: listing to show post of post type listings.
in query filter i selected field type to comapare : address radious 5 km inside of radious and distance center is set from user location
added view:listing to page name: show-listing
[wpv-geolocation]
[wpv-view name="listing" cached="off"]
[/wpv-geolocation]
my both posts should be displayed because address of both posts is current location and are 0 km (less than 5 km) from user location.

but i getting no item found

#1151247

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

location.gif

I set up a test to see if I could reproduce the problem, but could not, it worked as expected.

You can see in the screen recording my using my location to filter the results, which update accordingly.

Is the location input updated with the coordinates as per my test, and then the search fails while using these coordinates? And these coordinates match (within 5km) of the coordinates stored for the posts?

#1151667
filter.png

Hello Nigel

If setup test like you have setup it works but i am not trying like this. I want automatically no input from user except location permission.

what i am trying is: (automatically display post within 5 km radious from user location by selecting distance center is set from user location in query filter without any user input like you have setup

in query filter i selected field type to comapare : address radious 5 km inside of radious and distance center is set from user location.

in view i have setup address radious 5 km inside of radious and distance center is set from user location and then added to page like this:

[wpv-geolocation]
[wpv-view name="listing" cached="off"]
[/wpv-geolocation]

It should display posts after asking location permission but does not work.

In your test setup user have to click on use my location I want automatically no input from user except location permission.

thanks

#1151807

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Thanks for clarifying, I had misunderstood whether you were using a front-end filter or back-end filter.

I changed my site to use the back-end filter only and confirm that it does not work.

I've escalated this thread so that it can investigated further by my colleagues, and I'll get back to you when I have some feedback.

#1152409

Ok

Thanks

#1152974

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

There will be a Maps 1.7 release very soon (possibly as early as today) which focuses on WP 5.0 compatibility, and work will begin this week on Maps 1.7.1 to handle a few bug fixes, including the issue you reported here.

I'll keep you posted.

#1186596

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

A quick update to say that the issue is actually fixed in Maps 1.7.2, which is likely to be published after QA testing is done next week.

Thanks for your patience.

#1192900

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Just to let you know that Maps 1.7.2 was released this week, if you want to go ahead and update and verify the fix.