How to display your latest YouTube video in WordPress
Add a Custom HTML block and paste one line of code. The player always loads your newest upload, without a plugin and without an API key.
Add the player to a page or post
Get your code
Type your YouTube handle into the field above and tap Copy code.
Add a Custom HTML block
Open the page or post in the editor. Click the block inserter (+) and search for “HTML”, or type
/htmlon an empty line and press Enter.Paste the code
In current WordPress versions, click Edit HTML, paste the code and confirm with Update. Older versions take the code directly in the block.
Publish
Save or publish the page. When you upload a new video on YouTube, the player switches to it by itself.
Details worth knowing
WordPress.com
WordPress.com removes iframes from Custom HTML blocks unless the site is on a paid plan with hosting features activated. On other plans, link a button to latestyoutu.be/@yourhandle instead.
Who may add it
On your own WordPress site, administrators and editors can save the code. For authors and contributors WordPress strips the iframe when the post is saved, and on multisite networks only super admins may add it.
Sidebar and footer
The block works in pages, posts and templates, and in widget areas such as a sidebar or footer. The player always takes the full width of the place it sits in and keeps its 16:9 shape.
Shorts and livestreams
The switches above change what the block plays: ?shorts for your newest Short in an upright player, ?live for your stream while you are live.
Other ways to do it
The YouTube block
WordPress has its own YouTube block: paste the address of a video and it is embedded. It shows that one video until you replace the address by hand.
A plugin
Plugins such as Feeds for YouTube show a whole gallery of your channel. A good fit if you want a grid of videos. For one player that follows your uploads, a plugin is more than you need.
A button or text link
If you only want to point people to your newest video, link a button to latestyoutu.be/@yourhandle. That works on every plan and for every user role.
Steps checked in November 2026. Apps move their buttons around now and then. If something looks different, tell us.