So, apparently, I needed to read a little bit more before I posted my question.
After I posted the question, I ran across: https://moodle.org/mod/forum/discuss.php?d=258650, which is what I incorporated into the code I was using.
I modified my function to look like:
function video_embed( $html ) {
return '<div class="video-container"><div class="video-wrap">' . $html . '</div></div>';
}
add_filter( 'embed_oembed_html', 'video_embed', 10, 3 );
I added the following css:
.video-container {
max-width: 400px;
}
So, what I did was add a video-container
div that wrapped around my video-wrap
div, where I specified a max-width
.
I tried all different widths, all of which are now working 🙂
Related Posts:
- make WordPress image captions responsive
- Responsive Theme Design: how have slideshow on desktops/tablets and static photo on mobile using same template?
- WordPress Gutenberg Embed Blocks Are Not Responsive
- How to get attachment id of background image?
- Pb with responsive image sizes in WP 4.4
- Change function in responsive theme
- $content_width for responsive UI
- How do I make featured images retreived by the_post_thumbnail() responsive?
- wp_insert_post iframe missing
- GIF featured image is resized on server but not used in frontend. Why?
- Responsive 2 column staggered layout client expectations vs reality problem
- How to force the twentyfourteen narrow screen layout to apply to wide screens?
- twentythirteen h1 and h2 not resizing responsively
- YouTube video goes over sidebar [closed]
- Add div on EMED Tag
- Wp_List_Table not responsive
- mobile vs responsive sites [closed]
- Responsive Theme Design: how have slideshow on desktops/tablets and static photo on mobile using same template?
- responsive not working
- I want to add “View Desktop Version” for mobile visitors for my wordpress site
- Navigation Menu Rendering Issue on Windows 10
- Header Logo Scaling
- nextgen pro horizontal filmstrip moves up as browser narrows
- The hyperlink not responsive with post? [closed]
- Create various image sizes ad hoc
- FitVid not working for iframes on particular theme install
- Trouble with responsivitizing my twentythirteen header
- site is loading fully zoomed in on mobile devices
- Show content based on width?
- making images scalable for responsive designs [closed]
- Is Twenty Eleven Theme Responsive ? any update? [closed]
- How I can add responsive font size in theme.json file
- How to get WordPress Dataviews component responsive?
- YouTube Autoplay not working
- iframe refuses to display
- iframe refuses to display
- How to center an iframe horizontally?
- Making an iframe responsive
- Difference between document.referrer and window.parent.location.href
- How to align iframe always in the center
- Failed to load resource: net::ERR_INSECURE_RESPONSE
- Alternative to iFrames with HTML5
- iFrame onload JavaScript event
- Remove border from IFrame
- SecurityError: Blocked a frame with origin from accessing a cross-origin frame
- Failed to load resource: net::ERR_BLOCKED_BY_RESPONSE
- Blocked script execution in because the document’s frame is sandboxed – Angular application
- How to apply CSS to iframe?
- Inserting the iframe into react component
- Full-screen iframe with a height of 100%
- Media queries in Sass
- Make iframe automatically adjust height according to the contents without using scrollbar?
- Play videos with iframe in html
- HTML iframe – disable scroll
- How to do auto-width with HTML IFrame
- How do I hide related videos at the end of a YouTube playlist embed code?
- Remove scrollbar from iframe
- “Full screen” iframe
- How to disable auto-play for local video in iframe
- difference between iframe, embed and object elements
- Embedding instagram webpage inside an iframe
- Adjust width and height of iframe to fit with content in it
- Proper Format of iframe in PHP?
- Load denied by X-Frame-Options: does not permit framing
- Reload an iframe with jQuery
- What’s the best way to reload / refresh an iframe?
- Is there a way to embed an iframe in an email with text that updates?
- How to embed a youtube playlist with a sidebar
- Responsive iframe with max width and height
- Iframe’s overflow problem
- Full Page < iframe >
- How to embed an autoplaying YouTube video in an iframe?
- Change background color of iframe issue
- html : iframe not showing content in html
- How to fix facebook sharer button that appears cutted on wordpress
- Full width image in separated row on wordpress (Ref attacted)
- How do I disable responsive images in WP 4.4?
- Proper usage of wp_is_mobile()?
- Make WordPress WYSIWYG not strip out iframe’s
- Generating Thumbnails for video
- Setting a post’s featured image from an embedded YouTube video
- Do_Shortcode not working for Embed
- How to get SimplePie fetch_feed without stripping iframe code?
- WP 4.4. responsive images browser choosing the “wrong” one
- the_post_thumbnail responsive srcset not populating with custom image size
- How to insert pictures without hard coded dimensions?
- Create image formats with different qualities when uploading
- How-to make the admin area mobile friendly [closed]
- Get first video from the post (both embed and video shortcodes)
- How can I set image sizes and still have responsive images using the srcset attribute?
- Adding iframe Content to Sidebar Widget
- Images all broken after migration and upgrade
- Replace audio/video enclosure with player?
- Make fonts.com font work in TinyMCE (iframe referrer issue)
- Implementing “Video of the Day” Feature?
- Make a video post redirect to next post after completion
- Embed iframe or html page into dashboard widget
- When switching from html to visual editor the tag gets corrupted
- How-to add rewrite rules to point the uploads folder to a subdomain
- Give Author users the right to embed