[Cerrado] Map View – Need to Scale Result Limit with Search Area…
This support ticket is created hace 2 años, 6 meses. 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.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
Sun
Mon
Tue
Wed
Thu
Fri
Sat
-
10:00 – 13:00
10:00 – 13:00
10:00 – 13:00
10:00 – 13:00
10: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/Kolkata (GMT+05:30)
Este tema contiene 3 respuestas, tiene 2 mensajes.
Tell us what you are trying to do?
Because Views "Display [x] Items" only goes to 50 or No Limit, I have an add_filter function using $view_settings['limit'] = '[x]' line to change the limit to a custom number... BUT... it falls a bit short of what I need...
When a user is searching 60 miles, 75 results should be more than enough, but when they search 600 miles, I might want 300 results and if they're searching 1600 miles I might want No Limit.
As it is though they can widen the search to the whole planet and only get the static number of results set with the function.
Please understand I don't want to "Display [No Limit]" or an arbitrarily high number across the board because that will take a very long time for all searches, and the vast majority of users will only be searching small areas. But for those users wanting to search locations nationwide or worldwide, I'd like to give them an appropriate amount of results.
So I'm thinking there's some way to get the "show results with [x]" amount in that function so I can set an if statement or switch statement or something along those lines.
Hoping support can provide some ideas here.
Is there any documentation that you are following?
No
Is there a similar example that we can see? enlace oculto
The error is actually a firewall. If you send me your IP address I can whitelist you.
But yes, your understanding is correct, I want augment my function so that as the distance changes, the amount of results (posts) being looped by the view changes.
Of course, I'm open to alternative suggestions. It may be that there is a better way of setting this, but please take a look at the view (and nested views) in the web page to start and if needed I can better describe the structure.