Sauter la navigation

[Résolu] Show all results on map despite pagination

This support ticket is created Il y a 4 années et 6 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/Karachi (GMT+05:00)

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

Dernière mise à jour par Jaime Il y a 4 années et 6 mois.

Assisté par: Waqar.

Auteur
Publications
#1640951

Tell us what you are trying to do?
I have a View with search which displays locations on a map and a list of posts.
I found two options to display results, which works correctly:
a) Lists all results (no terms limit)
b) Lists results with pagination (with terms limits)

But what I need is to show all results on map, according to the search, despite pagination.
For example:
· A user arrives to the View and see 104 results on the map, but only 8 results on the first page of the pagination (with 13 pages)
· When a user makes a search, the map will display (for example) 24 results on the map, and again 8 results on the first pagination (with 3 pages this time)

* I've seen some tickets suggesting a solution with two Views: one with the map and another with the list of posts. But it doesn't make sense for me, because I'm using a search which will affect both map and list of results, I'm I right?

Is there any documentation that you are following?
I've found this topics, but there is no a clear answer for me
https://toolset.com/forums/topic/list-view-sorting-by-distance/
(the question related in the item 2 by stephenA, it's similar to my problem)
https://toolset.com/forums/topic/pagination-and-google-maps/

Is there a similar example that we can see?
Yes, the website I'm renewing has this feature on this url
lien caché

What is the link to your site?
I'm working on it, but you can see my View online, here
lien caché

#1642649

Hi Jaime,

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

Your observation is correct and since the number of markers shown on the map depends on the results coming from the view's list when limited results are shown on the page through pagination, markers for only those results are shown.

The workaround of using two separate views, one for the map and other for the results is also the most convenient since it doesn't involve complex code customizations.

As for the search filters, they'll apply to both views identically, as long as the "Query Filter" settings are the same and the views are set to update the results through page reload and not AJAX.

This is explained in detail in another thread:
https://toolset.com/forums/topic/is-it-possible-to-show-all-entries-on-map-but-the-entries-below-are-paginated/

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1645975

Hi Waqar!
Thanks for your answer!
🙂

It has resolved my problem almost perfectly (with a simple issue of scrolling which i'll investigate further later).
So, thank you very much.

Anyway I have another issue I would like to comment with you about paginations.
In my website I need to have some ajax pagination with horizontal scrolling.
The problem is the pagination only works fine when the pagination shortcode is inside the layout (I mean, before [wpv-layout-end]).
When I insert it after [wpv-layout-end] the pagination seems to get stucked in the same results infinite.

I've prepared you a page with two paginations (one outside and another inside) to see it in action. (go below, with red fonts)
lien caché

You can see it also here (in the pagination with film posters with the "next" "before" pagination items.
lien caché

Do you have any clue of what is teh problem with the pagination and the [wpv-layout-end]?
For me the major problem is UX because it's not a usual behavior the pagination controls slides with the results. The rest is ok.

Thanks a lot Waqar for your time and knowledge!
🙂

Les nouveaux fils créés par Waqar et associés à celui-ci sont repris ci-dessous :

https://toolset.com/fr/forums/topic/split-how-to-stop-pagination-controls-from-scrolling-with-the-results/

#1648501

Hi,

Thanks for the update and glad that my message helped.

As for the new question, I've split it into a new ticket and will reply to it shortly.
( https://toolset.com/forums/topic/split-how-to-stop-pagination-controls-from-scrolling-with-the-results/ )

You're welcome to mark this ticket as resolved and start a new one for each new question or concern.

regards,
Waqar

#1648513

My issue is resolved now. Thank you!