=== Super Ajax Search === Contributors: naveendeveloper Tags: ajax search, live search, autocomplete, instant search, search plugin Requires at least: 6.0 Tested up to: 6.9 Requires PHP: 8.1 Stable tag: 2.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Feature-rich live search with thumbnails, smart excerpts, result grouping, and category filtering. == Description == Super Ajax Search enhances your website's search with instant live results as users type. Built on the WordPress REST API with a modern vanilla JS frontend — no jQuery dependency, lightning fast. **Free Features:** * **Live Search** — Instant AJAX-powered results as you type. * **Thumbnails** — Display featured images in search results. * **Smart Excerpts** — Show content snippets with the search keyword highlighted in bold. * **Result Grouping** — Organize results by Post Type or Category. * **Category Filter** — Optional dropdown to filter results by category. * **Debounced Search** — 300ms debounce prevents excessive server requests. * **Transient Caching** — 1-hour cache for identical queries (configurable). * **REST API** — Modern endpoint replaces admin-ajax.php for better performance. * **Keyboard Navigation** — Arrow keys, Enter, and Escape support. * **Accessible** — ARIA labels, roles, and semantic HTML. * **Secure** — Nonce verification, input sanitization, output escaping, publish-only results. * **Customizable** — Configure post types, result limit, placeholder text, no-results message. * **Shortcode** — `[super_ajax_search]` with optional attributes. * **Multi-instance** — Multiple search forms per page, no ID conflicts. * **Responsive** — Mobile-friendly layout. * **Lightweight** — Under 15KB total (CSS + JS), zero dependencies. == Installation == 1. Upload the `ajax-searchwp` folder to `/wp-content/plugins/`. 2. Activate through the **Plugins** menu. 3. Go to **Super Ajax Search** in the admin sidebar to configure settings. 4. Use the shortcode `[super_ajax_search]` on any page or post. **Shortcode Attributes:** * `placeholder` — Override the search input placeholder. * `category_filter` — Show a category dropdown (`"true"` or `"false"`). Example: `[super_ajax_search category_filter="true" placeholder="Find products…"]` == Frequently Asked Questions == = How do I use the shortcode? = Place `[super_ajax_search]` in any post, page, or widget where you want the search to appear. = Can I choose which post types to search? = Yes. Go to Super Ajax Search settings and check the post types you want included. = Does it work with WooCommerce? = Yes. Enable the "Products" post type in the settings. = Is the search secure? = Yes. All inputs are sanitized, outputs are escaped, and only published posts are returned. == Changelog == = 2.0.0 = * **New:** Thumbnail support in search results. * **New:** Smart excerpts with keyword highlighting. * **New:** Result grouping by Post Type or Category. * **New:** Category filter dropdown. * **New:** 300ms debounced search to reduce server load. * **New:** REST API endpoint (replaces admin-ajax.php). * **New:** Transient caching (configurable TTL). * **New:** Keyboard navigation (arrow keys, Enter, Escape). * **New:** Vanilla JS — jQuery dependency removed. * **New:** Multi-instance shortcode support. * **New:** PHPUnit test suite. * **Security:** Explicit `post_status => 'publish'` to prevent data leakage. * **Security:** XSS-safe DOM rendering in JavaScript. * **Fix:** AJAX handlers now properly load (fixed `is_admin()` bootstrap bug). * **Refactor:** Full rename from Ajax SearchWP to Super Ajax Search. * **Refactor:** Options migrated from `ajax_searchwp_*` to `super_ajax_search_*`. * **Compat:** PHP 8.1+ with typed properties and return types. * **Compat:** WordPress 6.7 tested. = 1.5.0 = * Initial public release. == Screenshots == 1. Plugin settings page with all configuration options. 2. Search form with category filter and live results. 3. Results with thumbnails, excerpts, and keyword highlighting. == Upgrade Notice == = 2.0.0 = Major upgrade with new features, REST API, and security hardening. Settings are automatically migrated. == Support == If you have any suggestions, need any help, or want to connect with me, please reach out: * Email: info@techwithnavi.com * Website: https://techwithnavi.com/