Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/devildogdigital/ai-widget-shortcode/archive/refs/heads/main.zipA lightweight WordPress plugin that lets you embed a microphone-enabled AI voice assistant anywhere in WordPress using the [ai_widget] shortcode.
Originally developed for a live production website to make an externally hosted AI assistant reusable across pages, posts, and page-builder layouts.
Production Example
AI Widget Shortcode running on the Food Forest Design Minnesota production website.

Features
- Custom WordPress shortcode
- AI voice assistant integration
- Microphone-enabled iframe
- Responsive output
- Configurable widget URL
- Configurable widget height
- Browser microphone permission detection
- Works in pages, posts, widgets, and page builders
- Lightweight and reusable
- No WordPress core modifications
Technology
- PHP
- WordPress
- WordPress Shortcode API
- HTML5
- JavaScript
- Browser Permissions API
- Third-party AI integration
Usage
Basic usage:
[ai_widget url="https://example.com/your-ai-widget"]
Custom height:
[ai_widget url="https://example.com/your-ai-widget" height="250px"]
How It Works
The plugin registers the [ai_widget] shortcode.
When WordPress encounters the shortcode, the plugin:
- Reads the supplied AI widget URL.
- Generates a responsive iframe.
- Enables microphone access.
- Loads the external AI voice assistant.
- Checks the browser's microphone permission state.
- Displays the assistant wherever the shortcode is placed.
Installation
- Download or clone this repository.
- Upload the plugin folder to:
/wp-content/plugins/ai-widget-shortcode/
- Activate AI Widget Shortcode in WordPress.
- Add the shortcode to a page, post, widget, or supported page-builder element.
Example:
[ai_widget url="https://example.com/your-ai-widget"]
Why I Built It
This plugin was originally created to solve a real production requirement: placing the same AI voice assistant in multiple areas of a WordPress website without repeatedly inserting and maintaining the same iframe and JavaScript code.
Using a shortcode creates a cleaner, reusable integration that is easier to maintain and deploy.
Security & Code Quality
The public version includes:
- WordPress
ABSPATHprotection - Escaped URL output
- Escaped HTML attributes
- Sanitized shortcode parameters
- Unique iframe IDs
- Graceful browser compatibility handling
- No hard-coded production AI assistant URL
What This Project Demonstrates
- WordPress plugin development
- PHP
- WordPress Shortcode API
- JavaScript integration
- Responsive front-end implementation
- Third-party AI integration
- Browser microphone permissions
- Reusable component design
- Production-focused problem solving
Background
Most of my development work historically has lived in client production environments rather than public repositories.
This project is part of a curated GitHub portfolio showing representative examples of my WordPress, PHP, front-end, integration, and automation work.
Author
Travis Holzem
Web Developer & Founder, Devil Dog Digital AI