URL Sync and Shareable Filters
URL sync keeps the browser address bar aligned with the filters a visitor has selected. Instead of losing context on refresh, the page can restore the same filtered Archive Loop view from the URL alone. This is a core free feature of WPEnhanced Ajax Filter Blocks and works with standard query parameters on any page where Filter Posts and Archive Loop blocks are configured to synchronize.
Why URL sync matters
| Scenario | Without URL sync | With URL sync |
|---|---|---|
| Visitor bookmarks a filtered shop view | Bookmark saves only the base page | Bookmark includes category, price, etc. |
| Marketing email links to “blue widgets under $50” | Link opens unfiltered catalog | Link opens pre-filtered results |
| Support asks “what URL were you on?” | Hard to reproduce | Exact filter state visible in the address bar |
| Browser refresh | Filters may reset | Filters reapply from parameters on load |
Shareable URLs improve collaboration, SEO-friendly landing pages (when used thoughtfully), and support workflows.
What gets written to the URL
When synchronization is enabled, the plugin encodes active filter values as query parameters appended to the page URL. Parameter names correspond to filter identifiers derived from each Filter Posts Item’s source and configuration (taxonomy slug, meta key, search key, etc.).
Examples of what you might see on a blog filter page:
https://example.com/filtered-blog/?category=news&search=release
On a WooCommerce shop page:
https://example.com/shop/?product_cat=hoodies&min_price=20&max_price=80&filter_color=blue
Exact parameter names depend on how each filter item is configured. Multiple values (multi-select categories, several attributes) may appear as repeated keys or comma-separated values according to the filter type.
Pagination and sort order may also appear in the URL when those features are exposed on the loop, so page 2 of a filtered result set remains shareable.
Enabling synchronization
URL sync involves both global/plugin behavior and block-level settings:
- Filter Posts block — The Synchronize option (when enabled) participates in reading and writing URL parameters alongside AJAX updates.
- Plugin settings — Global defaults for URL behavior, parameter prefixes, or compatibility modes may live under Settings → WPEnhanced Ajax Filter Blocks. Review these when migrating from another filter plugin that used different query keys.
After publishing, test by applying filters and confirming the address bar updates without a full page navigation.
Page load and deep links
When someone opens a URL that already contains filter parameters:
- The plugin parses recognized parameters on DOM ready.
- Filter controls initialize to matching values (dropdowns pre-selected, checkboxes checked, etc.).
- The Archive Loop runs an initial query—or an AJAX request—with those constraints applied.
Visitors therefore land directly on a filtered view. This matches expectations for campaign links and organic search results that include query strings.
When creating marketing links, apply filters once on the front end, then copy the full URL from the browser bar. That guarantees parameters match what the plugin expects.
AJAX updates vs full page loads
During an AJAX filter change, the plugin typically uses history.pushState or replaceState to update the URL without reloading the document. That means:
- Faster UX (only the loop refreshes)
- Browser Back may step through prior filter states when history integration is enabled
- Analytics tools that read
window.locationsee updated query strings after each change
If a visitor disables JavaScript, the page may still load with filters from the URL on first paint depending on server-rendered fallback behavior, but interactive updates require the plugin scripts.
Pagination and URL sync
Filtered pagination should keep filter parameters while changing the page index. If page 2 drops filters:
- Confirm Filter Posts and Archive Loop share the same post type and selector ID.
- See Pagination loses filters in Troubleshooting when that page is available.
SEO and canonical URLs
Query parameters that only change result subsets (faceted navigation) often should not generate infinite indexable URLs. Common practices:
- Set canonical tags on filter pages (many SEO plugins handle this automatically).
- Use
noindexon low-value parameter combinations if your SEO strategy requires it. - Prefer a small set of marketing deep links rather than indexing every permutation.
WPEnhanced Ajax Filter Blocks does not replace your SEO plugin; it exposes filter state in URLs so you can decide indexing policy.
Compatibility notes
- Caching: Full-page caches must vary on relevant query strings or exclude filter pages. Otherwise visitors may see another user’s filtered HTML.
- Translation (WPML, etc.): Translated pages need consistent parameter names across languages. See FAQ: WPML when available.
- Custom pagination plugins: Custom page parameter names can be configured on Archive Loop when Use custom pagination parameter is enabled.
Pro features that interact with URL sync
Pro features use the same URL state:
- Load More / infinite scroll — May append content while preserving filter parameters in the URL.
- Conditional filters — Hidden items are omitted from the active filter set; visible items still sync normally.
- List/grid switcher — View mode may be stored in the URL or a cookie depending on block settings.
What's next
- How filtering works — REST pipeline and query building
- URL sync and shareable filters (feature guide) — Block-level options and examples
- Quick start — Test URL sync on your first filter page