-
Notifications
You must be signed in to change notification settings - Fork 0
What AI Fun Questions Does
AI Fun Questions puts a small card on your site. It shows a technology riddle, gives the visitor a box to type an answer into, and reveals the AI's punchline once they submit. Then they can ask for another one.
That is the whole feature. What makes it worth explaining is the decision underneath it.
Most "fun" widgets ship with a hundred jokes in an array and pick one at random. Visitors see a repeat on the third visit and stop looking.
This plugin has no bank to exhaust. When a visitor opens the widget, your server asks an AI provider for one new question, right then. The question and its punchline are held in a WordPress transient for ten minutes, and then they are gone. Nothing is written to a jokes table, because there is no jokes table.
Two consequences follow, and both matter:
- Every question costs something. Each widget load is one API call to whichever provider you configured. On a busy page that adds up — see the cost page when it is written, and consider self-hosting with Ollama.
- The plugin is only as good as the model behind it. A small local model tells weaker jokes than a large hosted one. That is a knob you control.
- The card appears and says "Thinking of something funny…" while it fetches.
- A question appears, with a hint underneath.
- They type an answer and press Submit Answer.
- Their answer is echoed back alongside the AI punchline.
- Next Question fetches a fresh one.
No login, no cookie, no account. The widget works for logged-out visitors, which is the point — it is meant for public pages.
This is the part worth knowing if you are wondering whether a curious visitor can just read the answer from the page source. They cannot.
When the question is delivered to the browser, the punchline is deliberately left out of the response. It stays on your server, in the transient, until the visitor posts an answer back. Only then is it released, and only once per question.
So "view source" shows a question and a hint, and nothing else. There is a dedicated page on this coming later, but that is the shape of it.
- Not the questions. Ten-minute transient, then discarded.
- Not the answers. A visitor's typed answer is echoed back to them in the same response and never written anywhere.
- Nothing that identifies the visitor. No account, no cookie, no tracking.
The only thing the plugin writes to your database is a small rate-limiting table, which holds counters — not content, and not anything that identifies a person.
- WordPress 6.4 or newer, PHP 7.4 or newer
- An AI provider: a self-hosted Ollama instance, an OpenAI-compatible endpoint and key, or a Hugging Face token
- Somewhere to put
[ai_fun_question]
Next: Installing the Plugin.
Getting started
- Home
- What AI Fun Questions Does
- Installing the Plugin
- The Settings Screen
- Adding the Widget to Your Site
Provider setup
Running it
- Keeping API Keys Out of the Database
- Rate Limits Explained
- Running Behind Cloudflare or a CDN
- What It Costs to Run
Troubleshooting
- Error Messages Reference
- Please Wait Before Requesting Another Question
- Could Not Generate a Question
Privacy and security
Extending