Loop Grid Search
Filter an Elementor Loop Grid from a plain HTML search input, without a page reload. Configure the Query ID and input ID under Settings → Loop Grid Search.
by jakirmithunbd · github.com/jakirmithunbd/loop-grid-search
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/jakirmithunbd/loop-grid-search/archive/refs/heads/main.zipReadme
=== Loop Grid Search === Requires at least: 6.0 Requires PHP: 7.4 Stable tag: 1.0.0 License: GPL-2.0-or-later
Filter an Elementor Loop Grid from a search field, without a page reload.
== Setup ==
- In Elementor, open the Loop Grid widget → Query → set a Query ID
(any slug, e.g.
listing_query). Save the template. - Go to Settings → Loop Grid Search and paste that Query ID in. Query IDs already present in your content are listed at the bottom of the page if you'd rather copy one across.
- Drag the Loop Grid Search widget onto the same page or template, somewhere above the grid. Style it on the widget's Style tab.
Outside Elementor, [loop_grid_search] renders the same field. It accepts
placeholder, label, icon="no", clear="no" and class.
== How it works ==
The term travels as a URL query arg. elementor/query/{query_id} reads it and
sets s on the grid's WP_Query, so the same code path serves a normal page
load and an AJAX update — nothing to keep in sync.
The script re-requests the current page URL with the term appended and swaps in the grid's markup. Because the server treats it as an ordinary request, the archive context, loop-item template, pagination and any taxonomy filters render exactly as they normally do. Responses carry a flag that reduces them to the grid alone, so a keystroke transfers a few kilobytes instead of a whole page.
== Notes ==
- Search matches post title and content, the same as WordPress core search. Taxonomy terms are not matched.
- Filtered views are marked
noindex, followby default, via both a header and the robots meta. Turn it off in the settings if you want them indexed. - Assets only load on pages that actually render the grid.