How LoopSort works with pagination, filters and caching
LoopSort sorts on the server, so every page of a Loop Grid keeps the same order and cached pages already contain the sorted grid. Here is how it behaves with Elementor’s pagination, Load more, the Taxonomy Filter and page caches.
| Feature | Behaviour |
|---|---|
| Numbered pagination, Previous/Next | Every page uses the same order. With the Sort Control, page links keep the visitor’s choice. |
| Load more, infinite scroll | Each batch continues in the same order with no duplicates. |
| Taxonomy Filter widget | Filtering by category keeps the LoopSort order and the visitor’s choice. |
| Elementor “Query ID” | Your own elementor/query/{id} code still runs after LoopSort. |
| Page caching (WP Rocket, LiteSpeed, Cloudflare…) | Cached pages contain the sorted grid. Visitor choices are in the URL (?loopsort=), so each choice is its own cache entry. If your cache ignores query strings, add loopsort and loopsort_device to its “cache query strings” list. |
| Elementor element cache | Leave the Loop Grid’s Advanced → Cache on Default or No. “Yes” stores the grid’s HTML, so the visitor sort can’t apply. |
| Display Conditions / visibility rules | Grids hidden by Elementor Pro Display Conditions stay hidden when LoopSort re-renders them. Rules LoopSort can’t check outside the page (e.g. JetEngine Dynamic Visibility) make the Sort Control fall back to a normal page reload. |
Tip: On big sites, sorting by a custom field makes the database sort every matching post. With thousands of posts, a combined database index on
wp_postmeta (post_id, meta_key)roughly halves the time; ask your host or use a database-index plugin. LoopSort never changes your database tables.