If you’re using the block editor, the fix is simple:
add_theme_support( 'responsive-embeds' );
You can also make the iframe responsive using pure CSS, just wrap it in a div
:
<div class="yt-container">
</div>
.yt-container {
position:relative;
padding-bottom:56.25%;
padding-top:30px;
height:0;
overflow:hidden;
}
.yt-container iframe, .yt-container object, .yt-container embed {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
}
This article covers making embeds responsive using CSS and JS:
Related Posts:
- Two column layout using Bootstrap [closed]
- Iframes inside bootstrap tab disappear when tab is shown
- How to edit embed filter for youtube video to allow responsive full width layout
- bootstrap carousel in wordpress home page showing small images and not responsive
- Mark error in form using Bootstrap
- How do I hide related videos at the end of a YouTube playlist embed code?
- Placeholder Color Change in Bootstrap
- Using glyphicon-facebook from bootstrap 3
- How to add text over the image in bootstrap
- bootstrap modal not working at all
- Setting a post’s featured image from an embedded YouTube video
- Do_Shortcode not working for Embed
- How do I embed youtube videos with https instead of http in the URL?
- WordPress Gutenberg Embed Blocks Are Not Responsive
- Modify youtube video size on one page and show another size on different page
- add_filter to youtube embeds?
- Excess White Space Above Admin Bar on Frontend Using Twitter Bootstrap
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- How to change thumbnail of embedded Youtube video?
- Manipulating oembed_dataparse stopped working for YouTube embeds
- Youtube – Embed as IFRAME
- Any way to use a custom Parameter for youtube embed without using an iframe?
- how to install bootstrap to twentyfourteen theme
- How to convert bootstrap tab functionality into wordpress using just 1 query?
- Is it possible to modify the default YouTube embed attributes string?
- Add a YouTube or Vimeo video as a post attachment?
- Convert all youtube link to embed
- Get all Youtube video’s from posts and embed them on a different page
- Youtube parameters within WordPress embed code?
- Using/compiling Foundation SASS on live WordPress server
- Embed YouTube video on category description
- vimeo/youtube video embed with thumbnails
- Embed YouTube video from custom field value
- Embeding YouTube video via a template function throws iframe cross-domain policy error
- WordPress \ Bootstrap 4 not building breadcrumbs correctly
- NavWalker Bootstrap Error (won’t dropdown)
- YouTube embed parameters?
- Embed Youtube video link in wordpress editor
- Removing height and width from images with a caption
- Why is my Bootstrap 5 navbar not displaying the drop down menu on smaller screens?
- How to auto embedded youtube with wp_insert_post()
- bootstrap 4 carousel inside every post of a page [closed]
- Each Slide Has Something Missing In Carousel
- How to apply an ID to Shortcode Embedded iframe
- How to Implement Responsive YouTube Video Framing? [closed]
- How to change the way wp_embed handles only youtube videos?
- How to embed YouTube videos in posts without adding suggested videos at the end?
- How do I embed a YouTube video in WordPress 3.0?
- WordPress block editor embeds not working in theme (single.php)
- WordPress keeps autoplaying my Youtube-Links no matter what I write
- How to make my new theme read [youtube id=”id of the video here” width=”600″ height=”350″]?
- How to make an embeded a Youtube video from custom field text responsive to screen size?
- Installing Bootstrap on Twentyeleven Theme
- Enque a stylesheet in functions.php to override Bootstrap
- Div around YouTube video
- boostrap on wp-admin backend via plugin installation
- Embedding Youtube video on comments
- How to allow YouTube object embed in WordPress 3+?
- Editor inserting bootstrap css and we don’t know why
- YouTube embeded video will not resize (only full screen responsive) [closed]
- Why is my get_post_meta not properly calling the custom field when attempting to embed a YouTube video?
- Bootsrap.css Not Working [closed]
- iframe with Youtube video appears for logged-in users, but not for incognito users
- WordPress keeps showing mobile version on Internet Explorer
- Different column width in 2 rows with bootstrap and custom post types-different classes needed
- Static image for embedded YouTube video instead of blank player?
- Problems with Bootstrap 3 Carousel Integration
- WordPress fails to embed video URL
- Responsive menu on genesis theme [closed]
- Use of Bootstrap nav in a page
- add youtube thumbnail in index and single.php add video
- Rename Smart YouTube’s httpv back to http for all posts
- Display WP Meta Details in Bootstrap Modal
- Why items could not be enclosed within items in WordPress?
- Can’t embed certain youtube videos into theme
- Block editor: Sandbox iframe shows outdated HTML
- How to modify the HTML output of Gutenberg block? (Youtube)
- WordPress Loop with different Column sizes
- creating different style CTA button in the menu
- Bootstrap navbar responsiveness on WordPress theme menu not working
- Add youtube embed to woocommerce variations
- WordPress Mediaelement – Youtube Videos Embed Options
- Post editor doesn’t save embed media [closed]
- Bootstrap code acting weird on wordpress
- Responsive images in Bootstrap 4 slider
- How To Get WordPress To Pickup Boostrap’s CSS File?
- Connecting Stylesheet in WordPress using less styles
- Learning Html and a new on wordpress designing and developing
- How to make Youtube short code transfer
- Bootstrap Nav menu won’t toggle collapse when in mobile viewport size
- Display WP posts in 3 responsive columns
- Link permalink in Twitter Bootstrap “TypeAhead” results
- Can someone please help me find a solution to my youtube embed problems? [duplicate]
- Bootstrap and Respond.js
- How to display a list of authors in bootstrap grid?
- Twentyseventeen theme and Bootstrap are seemingly incompatible [closed]
- How to make this splash page responsive
- do_shortcode for twitter doesn’t work well
- Enueue script for bootstrap
- how To Use wp_link_pages With bootstrap 4 for WordPress