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 align iframe always in the center
- Alternative to iFrames with HTML5
- How to disable auto-play for local video in iframe
- Responsive iframe with max width and height
- How to embed an autoplaying YouTube video in an iframe?
- Proper usage of wp_is_mobile()?
- Setting a post’s featured image from an embedded YouTube video
- Do_Shortcode not working for Embed
- WP 4.4. responsive images browser choosing the “wrong” one
- Make fonts.com font work in TinyMCE (iframe referrer issue)
- Add post class to the TinyMCE iframe?
- How to handle valueless attributes in shortcodes?
- WP Cron doesn’t save or in post body
- How to overwrite youtube embed?
- Remove Header and Footer in iframe
- Don’t load scripts if on mobile/tablet
- How do I control video media display sizing with native wordpress player
- oEmbed vimeo with add_query_arg parameters not inserted to HTML
- Get a list of all image sizes that match aspect ratio of original one
- Allow all attributes in $allowedposttags tags
- How to fix samesite attribute in wordpress for chrome errors?
- Check if page is embeded
- How can I create a custom meta box to add an mp4 video to a page?
- Extract an embedded video from the content
- WordPress get embedded/attachment video
- Removing height and width from images with a caption
- External content won’t load in iframe in Safari
- Twenty fifteen theme – change responsive menu condition
- Display Authors in a grid loop
- Responsive menu gone on wordpress Responsive theme
- Set 3 iframes in a row
- Change Responsive Images Maximum Width of 1600px
- Custom responsive ‘featured image’ sizes
- How to load different homepage on Mobile.?
- How to stop WordPress from completely overriding my tags in my templates?
- the_content not showing responsive image attributes srcset or sizes
- Different column width in 2 rows with bootstrap and custom post types-different classes needed
- Designing a plugin that uses an iFrame to process data in admin
- Define width of featured image thumbnails, but also make responsive?
- Twenty Eleven Theme Adjusts for iPhones. How to stop this feature?
- is there a way to preload specific images for desktop users only? (excluding mobile users)
- Responsive header image
- Is there a way to auto generate poster image for videos
- Cannot collapse a responsive menu in WordPress
- How can I use an iframe element as my header media?
- Can’t Listen to KeyDown in TInyMCE Iframe (jQuery) and Pass it to Parent HTML FORM
- Disable Responsive Image Sizes crop
- Disable automatic embed links
- How to change src to data-src for iframe inside WP content?
- How to make in wordpress a gallery with 3 colums to 1 on mobile devices responsive?
- WordPress 5: including larger thumbnail image sizes in srcset than I have set
- Problem with video url from ad manager
- Responsive images with srcset
- How to completely prevent WordPress from destroying/modifying my shortcode outputs?
- Slider Revolution video on autoplay doesn’t start
- built-in responsive images in content – do I need to add anything to functions.php?
- Hide video & make a clickable play button icon on header
- Sidebar widgets are over the content in mobile mode, how can I fix it? [closed]
- You tube videos Appear Different Dimension
- iframe not being displayed in a widget
- Problems Replacing Background Color with Static Background Image in Responsive Design
- Transform .wp-video to the native video player of the browser
- Resizing built-in wordpress video not working! [closed]
- How to insert a column (part of theme) in the middle of the content body?
- feed url problem
- Change featured thumbnail based on screen size
- Generate / attach Image srcsets from ACF Image Field
- WordPress site is not loading properly ( showing a min-page)