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

AttributeDefaultDescription
id / urlYouTube video ID or URL (auto-extracted).
listPlaylist ID (PL...).
width560Container width (px or %).
aligncenterAlignment (left, center, right).
ratio16:9Aspect ratio (supports 9:16 for shorts).
start / endStart/end timestamp (1m23s or seconds).
autoplay0Autoplay video (use mute=1).
mute0Start muted.
controls1Show/hide controls.
rel0Related videos (0 = same channel only).
modestbranding1Reduce YouTube branding.
nocookie1Enable privacy mode (youtube-nocookie).
ids / urlsCSV of multiple videos (for grid).
cols2Number of grid columns.