We all know, that I love Japanese culture. I decided to do another fun project but this time, I felt like creating a repo, to show you the actual outputs that ChatGPT created. Take a look at the repo here for the full package.
Here’s how I brought this fortune cookie to fruition using ChatGPT!!
Step 1: Generating a Plugin
ChatGPT Prompt:
“Create a custom wordpress plugin that generates a fortune cookie for them. Have at least 100 fortunes for people that they could randomly get each time they press a “whats my fortune” button.”
Output:



After some tweaking and testing, I had a fcg-scrpt.js, fcg-style.css, and fortune-cookie-generator.php.
Step 2: Install the Plugin
- Download the plugin ZIP:
fortune-cookie-generator.zip.- I decided to create a new github for this blog to showcase the projects I have done. You can check out the repo here: Cookie Generator Repo

- In your WordPress dashboard, go to Plugins → Add New → Upload Plugin.
- Upload the ZIP and click Activate.
Step 1: Add the Shortcode
Place the shortcode anywhere on a page, post, or widget.
Visitors will see:
- A “What’s my fortune?” button.
- A randomly selected fortune that appears when you click the button
Step 3: Customize Your Fortunes (Optional)
Want to add your own sayings, quotes, or tips?
- Open the plugin folder:
wp-content/plugins/fortune-cookie-generator/. - Edit
fortune-cookie-generator.php. - Look for the
$fortunesarray and add, remove, or change entries.
You can also swap images or tweak the CSS for colors, sizes, or animation in fcg-style.css.
Step 4: Test and Enjoy
- Click the button — a fortune appears!
- Works with multiple shortcodes on a page.
- Fun, engaging, and interactive for your visitors.

