This update adds to the existing plugin:
class-search-handler.php — REST API with 4 endpoints:
GET /wp-json/ausstell/v1/search/autocomplete?q=keyword — Autocomplete suggestionsGET /wp-json/ausstell/v1/search/products?... — Faceted product searchGET /wp-json/ausstell/v1/search/facets?... — Facet countsGET /wp-json/ausstell/v1/search/similar/(?P<product_id>\d+) — Similar piecessearch.js — Frontend JavaScript (943 lines):
archive-product-exhibition.php — Enhanced archive template:
ausstellungsstuecke.php — Plugin bootstrap updates:
require_once for SearchHandlerrest_api_init hook for SearchHandler routeswp_enqueue_script for search.jsAll 4 files are in a delta ZIP at:
https://ausstellungsstuecke-kaufen.de/wp-content/uploads/2026/05/ausstell-search-update.zip
| File | Path in plugin |
|---|---|
| class-search-handler.php | wp-content/plugins/ausstellungsstuecke-plugin/includes/ |
| search.js | wp-content/plugins/ausstellungsstuecke-plugin/assets/js/ |
| archive-product-exhibition.php | wp-content/plugins/ausstellungsstuecke-plugin/templates/ |
| ausstellungsstuecke.php | wp-content/plugins/ausstellungsstuecke-plugin/ |
GET /wp-json/ausstell/v1/ should show /search/autocomplete, /search/products, /search/facets, /search/similar/(?P<product_id>\d+) routes__return_true)class-search-handler.php contains one fix: declare(strict_types=1); (was missing closing paren)Visit the shop page — you should see:
URLs with search params should work: /?s=monet&exhibition_category=gem%C3%A4lde
Neueste Kommentare