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
- Failed to load resource: net::ERR_BLOCKED_BY_RESPONSE
- Inserting the iframe into react component
- What’s the best way to reload / refresh an iframe?
- How do I disable responsive images in WP 4.4?
- Make a video post redirect to next post after completion
- the_post_thumbnail scaling not hard cropping
- Load post content into iframe
- How to oEmbed from custom field, responsive to container size and responsive
- Trying to load a responsive CSS media query using Custom Taxonmy
- how to add new .webm mime types
- Adding a video description in a similar way to a image caption
- Displaying all Video Post Formats to Page
- Best Practices for Video Uploads to WordPress
- How to check If Oembed is empty or not
- ACF Plugin – Random Gallery Image with wp_get_attachment_image()
- Featured image (responsive) above content is too small after update to WordPress 4.4
- Can’t show custom post thumbnail sizes as background images
- Embed Post in external page
- Custom Login iframe doesn’t work
- Display posts from a different website on Genesis Responsive Slider
- Woocommerce: Can’t put items in cart in iframe and on iphone
- MP4 video on wordpress working on desktop, not on mobile devices
- Responsive Images Warping
- How can I echo og:video url, if the post has video content?
- Client system for media review?
- Upload restrictions – upload_mimes – filter: Adding multiple MIMEs for a single extension and adding multiple extensions for a single MIME type?
- Why is this jquery / java script code not working in mobile / in devices?
- How to play a video without using plugin?
- Custom image size vs CSS sizing
- Disabling Wp_is_mobile from backend?
- Iframe scrolls to middle of the page on load in Firefox [closed]
- Responsive scaling of image for the_post_thumbnail() [closed]
- WP.org acceptable iframe alternative
- Where are the src and srcset sizes coming from?
- Modify YouTube Embed Code to fit theme
- iFrames when using custom shortcode, ACF and Elementor only renders alternate ones
- How to edit embed filter for youtube video to allow responsive full width layout
- My redirect URL doesn’t show any pages on my website [closed]
- Serve different images per screen size and cache possible?
- Responsive menu on genesis theme [closed]
- Configure WordPress to Use Responsive Image Rendering
- Hide download option video shortcode
- bootstrap carousel in wordpress home page showing small images and not responsive
- WordPress 5.2.1: Embed video is not working. Showing video link on fronted
- Videos Post Type with Custom Filters
- add class to all images inside the content
- Bootstrap navbar responsiveness on WordPress theme menu not working
- Render Shortcode in Lightbox Gallery
- Is it possible to embedd this web app to my website [duplicate]
- Categories Help and video uploads
- how to embed a .mp4 video the url postfix with secret key
- Add div after every 4 posts then every 2 posts for a responsive loop
- Different custom header video on different pages
- Responsive WordPress Gallery
- Post preview in iframe without saving the post
- Page will only display first 6 videos
- How to handle responsive and non responsive websites in one WordPress Theme?
- Have video content populate page from upload sub-directory?
- Configuration Options for embedded YouTube Videos
- Force resize for all video content
- How to modify responsive images in post thumbnails
- How to generate a responsive output from plugin?
- Navigation menu, remove item from desktop
- Strange video appears in background on Safari only [closed]
- How can I create iframe/embeddable content from my WordPress site?
- Understanding responsive imagery
- A way to upload old html pages with all its assets via WordPress admin and to add a fixed menu on top of those (a la Wayback Machine)
- Remove one srcset entry from wp_get_attachment_image