WordPress plugin · Requires WP 6.4+ · PHP 7.4+

Nobody has heard this joke before.

A tiny widget that asks an AI for one fresh tech riddle, right when a visitor wants one. There is no joke database to run dry — every question is written on the spot, held for ten minutes, then thrown away.

3 AI providers  ·  0 questions stored  ·  GPL-2.0-or-later

AI FUN QUESTION
Thinking of something funny…

One shortcode

That is the entire integration.

Drop it into a post, a page, a block or a widget area. No settings per instance, no shortcode attributes to learn.
[ai_fun_question]

How it works

Four steps, and the punchline never leaves the server early.

A visitor lands

The widget renders and asks your site for one question. No account, no cookie, no login.

WordPress asks the AI

Your server calls the provider you configured, with your key. The browser never sees it.

The question appears

Question and hint go to the browser. The punchline stays behind, in a ten-minute transient.

They answer, you reveal

The answer is posted back, the punchline is released once, and the question is discarded.

Why that matters: the punchline is never sent with the question, and it is only released over POST, once per question. Provider keys stay server-side, AI output is sanitised before it is stored, and requests are rate limited per visitor and per IP.

What it is for

A small reason to stay a few seconds longer.

Most “fun” widgets ship a hundred jokes in an array. Visitors see the same one twice and stop looking. This plugin has no bank to exhaust: it asks a model for something new each time, so the tenth visit is as fresh as the first.
It is deliberately small. One shortcode, one settings screen, no tracking, no accounts, nothing stored about the person answering.

Where to put it

Anywhere a page goes quiet.

The 404 page

Someone hit a dead link. Give them a riddle instead of an apology and a search box.

A booth screen

WordCamp, a meetup, a careers fair. A laptop on a stand and something to talk about.

A blog sidebar

A recurring bit of personality on a long-form tech blog, without another content chore.

An intranet break page

Self-host the model with Ollama and nothing leaves the building.

A thank-you page

After a signup or a purchase, when the work is done and the mood is good.

A coming-soon page

Something to do while the real site is being built, other than leaving.

Who it is for

If you can add a shortcode, you can run it.

01

Site owners & bloggers

No code. Install, choose a provider, paste the shortcode. The whole setup is one screen under Settings.

02

Agencies & freelancers

A cheap bit of delight for a client build. Keys live in wp-config.php, so they never sit in a database you hand over.

03

Developers

A provider interface to implement, filters for rate limits and client IP, and a self-hosted path through Ollama.

How to use it

Three steps, start to finish.

1

Install and activate

Upload the plugin and activate it. It creates one small table for rate limiting and nothing else.

2

Point it at a model

Open Settings › AI Fun Questions, pick a provider and paste a key — or keep it out of the database entirely:
define( 'AI_FQ_OPENAI_KEY', 'sk-…' );

3

Drop in the shortcode

Paste it into any post, page, block or widget area.
[ai_fun_question]

Pick a provider:  Ollama — self-hosted, nothing leaves your network  ·  OpenAI-compatible — any endpoint speaking the chat API  ·  Hugging Face — hosted inference

Go on. Give them something to smile at.

Free and GPL-2.0-or-later. Bring your own model, or run one on your own hardware.

AI Fun Questions — a small WordPress plugin

GPL-2.0-or-later