Smarter WP Post & WC Product Search Setup Guide
Smarter WP & WC Search Setup Guide
Version: 1.3.0
Date: 2025‑08‑10
1. Overview
————–
Smarter WP & WC Search adds a smart search box powered by GroqChat LLMs.
It renders a question input and displays AI answers on the search results page..
2. Installation
—————-
– Upload the plugin via the WP plugin page
– Activate plugin.
Configure Settings → Smarter WP & WC Search
3. Shortcodes
—————
[ ai_search] – renders question input.
[ ai_search placeholder=”Your Placeholder Text”]
4. Settings
—————
1. Go to **Settings → Smarter WP & WC Search**.
2. Enter your *Groq API Key* (available at <https://console.groq.com/keys>).
3. Choose your preferred LLM model and temperature. (0,5)
4. Select Products Only, Posts Only or Products and Posts
5. Enter your most relevant category slugs
6. Select the usage of Tags and Attributes
7. Enter a brief description of your business or shop
and a typical query of your customers/site visitors
8. Click Save Changes button
9. Click Generate Prompt button
10. Click Save Changes.
11. (Optional) Update the system prompt to customize JSON extraction. Example:
“`json
{“category”:”hiking-boots”,”name”:”waterproof”,”min_price”:50,”max_price”:200}
“`
12.. Customize search input dimensions and styling options.
.Use the shortcode `[ ai_search]` or [ ai_search placeholder=”Your Placeholder Text”]`to display the search form anywhere on your site.
== Usage ==
**Basic Search Examples:**
* “red shoes under $100” → Finds red shoes with max price $100
* “SKU12345” → Direct redirect to product with that exact SKU
* “wireless headphones” → AI extracts relevant product attributes
* “hiking gear in outdoor category” → Searches outdoor category for hiking-related products
Usage Flow
—————
User types query → AJAX request → GroqChat → Answer displayed.
Troubleshooting
—————–
See detailed FAQ in plugin README.
Customization
—————-
Edit assets/css/ai-search-assist.css for styling.
Security
—————
API key stored as password field.
Nonce protection on AJAX.
Input and output sanitized.
Licensing
—————
GPL‑2.0-or-later
