2 minutes reading time (265 words)
The YouTube Shortcode Plugin replaces with a responsive, privacy-friendly YouTube iframe. It auto-detects video IDs, playlists, and timecodes from all common URL formats and can even render video grids.
✅ Supports watch, youtu.be, shorts, embed, live URLs
🎞️ Handles playlists, timestamps, and responsive grids
🧩 Works with Joomla articles, modules, and builders
🔒 Built-in privacy mode using youtube-nocookie.com
Basic Usage
Insert the shortcode into any Joomla article or module:
{youtube id="dQw4w9WgXcQ"}
{youtube url="https://youtu.be/dQw4w9WgXcQ" width="100%"}
{youtube url="https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=1m23s" autoplay="1" mute="1"}
Playlists
{youtube list="PL123..."}
{youtube url="https://www.youtube.com/watch?v=ID&list=PL123..."}
{youtube url="https://www.youtube.com/shorts/ID" ratio="9:16"}
The plugin recognizes shorts/ID and lets you set ratio="9:16" for vertical layout.
Grid Layout
Render multiple videos in a clean grid using ids or urls with cols:
{youtube ids="dQw4w9WgXcQ,aqz-KE-bpKQ" cols="2" width="100%"}
Shortcode Attributes
| Attribute | Default | Description |
|---|---|---|
id / url | — | YouTube video ID or URL (auto-extracted). |
list | — | Playlist ID (PL...). |
width | 560 | Container width (px or %). |
align | center | Alignment (left, center, right). |
ratio | 16:9 | Aspect ratio (supports 9:16 for shorts). |
start / end | — | Start/end timestamp (1m23s or seconds). |
autoplay | 0 | Autoplay video (use mute=1). |
mute | 0 | Start muted. |
controls | 1 | Show/hide controls. |
rel | 0 | Related videos (0 = same channel only). |
modestbranding | 1 | Reduce YouTube branding. |
nocookie | 1 | Enable privacy mode (youtube-nocookie). |
ids / urls | — | CSV of multiple videos (for grid). |
cols | 2 | Number of grid columns. |