-
Notifications
You must be signed in to change notification settings - Fork 0
Adding the Widget to Your Site
One shortcode, no attributes:
[ai_fun_question]
Paste it wherever you want the card to appear. That is the entire integration — there is nothing to configure per instance.
Anywhere WordPress runs shortcodes:
- Block editor — add a Shortcode block and paste it in
- Classic editor — type it into the content
- Widget areas — a Shortcode widget in a sidebar or footer
- Page builders — Elementor's Shortcode widget, or the equivalent in your builder
-
Templates —
echo do_shortcode( '[ai_fun_question]' );in a PHP template
A Custom HTML block will not work. That block does not run shortcodes, so you will see the literal text [ai_fun_question] on the page. Use a Shortcode block instead.
There are no parameters. You cannot currently set a category, a heading, a theme or a starting question on an individual widget — the shortcode accepts nothing and every instance behaves identically.
If you need per-instance options, that is a feature request rather than a configuration problem.
The widget ships with its own stylesheet and inherits your theme's font. It is a plain card: white background, one-pixel border, sixteen-pixel corners, and a subtle shadow.
To restyle it, target the plugin's classes from your theme or the Customiser's Additional CSS. The outer element carries the ai-fq class, and the parts inside follow the same ai-fq__* prefix. Nothing in the widget uses inline styles, so ordinary CSS specificity is enough — no !important needed.
Multiple widgets work, and each is independent: separate question, separate answer box, separate reveal.
There is a limit worth knowing about, though. Each widget fetches its own question as the page loads, and generation is rate limited per visitor, currently five per minute. So a page with six or more widgets will show the first five and the sixth will display:
Please wait before requesting another question.
For most pages one widget is the right answer. If you genuinely need more, the limit is adjustable with a filter — covered on the rate limits page.
On load it briefly says "Thinking of something funny…", then shows a question and a hint. Type anything and press Submit Answer, and the punchline appears beneath your answer, with a Next Question button.
If instead you see an error, nothing you did on this page is wrong — the problem is in the provider configuration. The troubleshooting pages map each message to its cause.
Every widget that loads makes one API call to your provider. A page with one widget getting a thousand visits a day makes a thousand calls a day, and crawlers count too.
If that matters, either self-host with Ollama, where the marginal cost is zero, or keep the widget off your highest-traffic pages. This is covered properly on the cost page.
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