Embed Blocks
Embed blocks allow you to seamlessly integrate content from external platforms and services using oEmbed technology.Core Embed Block
Name:core/embed
Description: Add a block that displays content pulled from other sites, like Twitter or YouTube.
Attributes
url(string) - URL to embedcaption(string) - Embed captiontype(string) - Embed type (video, rich, etc.)providerNameSlug(string) - Provider identifier (youtube, twitter, etc.)allowResponsive(boolean) - Allow responsive sizing, default: trueresponsive(boolean) - Use responsive sizingpreviewable(boolean) - Can preview the embed
Supports
- Align: left, center, right, wide, full
- Spacing: margin
- Interactivity: clientNavigation
Usage
Supported Embed Providers
The core embed block supports content from numerous platforms through oEmbed:Video Platforms
YouTube
- URL Pattern:
https://www.youtube.com/watch?v=VIDEO_ID - Short URL:
https://youtu.be/VIDEO_ID - Features: Responsive, video controls, playlists
Vimeo
- URL Pattern:
https://vimeo.com/VIDEO_ID - Features: High-quality video, privacy controls
Dailymotion
- URL Pattern:
https://www.dailymotion.com/video/VIDEO_ID
VideoPress
- URL Pattern:
https://videopress.com/v/VIDEO_ID - Features: WordPress.com integrated video hosting
Social Media
Twitter / X
- URL Pattern:
https://twitter.com/username/status/TWEET_ID - Features: Embedded tweets with media, replies, likes
- URL Pattern:
https://www.facebook.com/username/posts/POST_ID - Features: Posts, videos, live streams
- URL Pattern:
https://www.instagram.com/p/POST_ID/ - Features: Photos, videos, reels
TikTok
- URL Pattern:
https://www.tiktok.com/@username/video/VIDEO_ID - Features: Short-form videos
Publishing Platforms
WordPress
- URL Pattern:
https://example.wordpress.com/POST_SLUG/ - Features: Embed posts from WordPress.com and other WordPress sites
Medium
- URL Pattern:
https://medium.com/@username/post-slug
- URL Pattern:
https://www.reddit.com/r/subreddit/comments/POST_ID/
Tumblr
- URL Pattern:
https://username.tumblr.com/post/POST_ID
Music & Audio
Spotify
- URL Pattern:
- Track:
https://open.spotify.com/track/TRACK_ID - Album:
https://open.spotify.com/album/ALBUM_ID - Playlist:
https://open.spotify.com/playlist/PLAYLIST_ID - Artist:
https://open.spotify.com/artist/ARTIST_ID
- Track:
SoundCloud
- URL Pattern:
https://soundcloud.com/artist/track-name - Features: Audio player with waveform
Mixcloud
- URL Pattern:
https://www.mixcloud.com/username/show-name/
Creative Platforms
Flickr
- URL Pattern:
https://www.flickr.com/photos/username/PHOTO_ID - Features: Photo embedding with metadata
SmugMug
- URL Pattern:
https://username.smugmug.com/PATH/
Speaker Deck
- URL Pattern:
https://speakerdeck.com/username/presentation-slug - Features: Presentation slides
SlideShare
- URL Pattern:
https://www.slideshare.net/username/presentation-title
Developer Platforms
GitHub Gist
- URL Pattern:
https://gist.github.com/username/GIST_ID - Features: Embedded code snippets
CodePen
- URL Pattern:
https://codepen.io/username/pen/PEN_ID - Features: Interactive code examples
Other Services
Amazon Kindle
- URL Pattern: Book preview URLs
Animoto
- URL Pattern: Video URLs
Cloudup
- URL Pattern: File sharing URLs
Crowdsignal (Polldaddy)
- URL Pattern:
https://poll.fm/POLL_ID - Features: Polls and surveys
Imgur
- URL Pattern:
https://imgur.com/IMAGE_ID
Issuu
- URL Pattern: Publication URLs
- Features: Digital publications
Kickstarter
- URL Pattern:
https://www.kickstarter.com/projects/USERNAME/PROJECT
Meetup
- URL Pattern: Meetup group and event URLs
Pocket Casts
- URL Pattern: Podcast episode URLs
ReverbNation
- URL Pattern: Artist and song URLs
Scribd
- URL Pattern:
https://www.scribd.com/document/DOC_ID
TED
- URL Pattern:
https://www.ted.com/talks/TALK_SLUG
- URL Pattern:
https://www.pinterest.com/pin/PIN_ID/
Wolfram Cloud
- URL Pattern: Notebook URLs
Advanced Embed Usage
Responsive Embeds
By default, embeds are responsive and adjust to container width:Embed Alignment
Embed with Caption
Custom oEmbed Providers
You can register custom oEmbed providers in WordPress:Troubleshooting Embeds
Common Issues
- Embed not working - Check if URL is publicly accessible
- Preview not loading - Verify oEmbed endpoint is responding
- HTTPS required - Many providers require HTTPS URLs
- Privacy restrictions - Some embeds may be blocked by privacy settings
- Rate limiting - Too many embed requests may be throttled
Debug Embed Data
Test oEmbed endpoint directly:Security Considerations
- Content Security Policy - Embeds may require CSP adjustments
- Privacy - External embeds may track users
- Performance - Multiple embeds can slow page load
- Validation - WordPress validates oEmbed responses
- Sanitization - Embed HTML is sanitized before display
Performance Best Practices
- Lazy loading - Enable lazy loading for below-fold embeds
- Limit embeds - Too many embeds impact page speed
- Cache responses - WordPress caches oEmbed responses
- Fallback content - Provide fallback for failed embeds
- Local alternatives - Consider self-hosting video when possible
Accessibility
- Captions - Always provide descriptive captions
- Transcripts - Include transcripts for video/audio content
- Alt text - Use caption field for context
- Keyboard navigation - Ensure embedded players are keyboard accessible
- Screen readers - Test embedded content with screen readers
Block Variations
Embed blocks can be registered as variations for specific providers:Best Practices
- Test embeds - Preview embeds before publishing
- Use captions - Provide context for embedded content
- Check licenses - Ensure you have rights to embed content
- Mobile testing - Verify embeds work on mobile devices
- Fallback plans - Have alternatives if embed service is down
- Privacy compliance - Consider GDPR/privacy implications
- Performance monitoring - Track impact on page load times
- Update regularly - Keep WordPress updated for latest provider support