Skip to content

Adding the Widget to Your Site

sarangshahane edited this page Aug 25, 2026 · 1 revision

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.

Where it works

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
  • Templatesecho 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.

The shortcode takes no attributes

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.

Styling it

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.

Using more than one on a page

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.

What a working widget looks like

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.

Cost, briefly

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.

Clone this wiki locally