Today I had an issue where the Youtube Gutenberg block in WordPress was not maintaining the aspect ratio across devices. Once I discovered the cause of the issue, the fix was simple.
Add this code to functions.php to fix the Youtube block’s responsive issues
To fix the responsive issues with the Youtube block, simply add the following code to your functions.php file in your theme (or, alternatively, put it in your functional plugin):
// Add support for responsive embedded content. add_theme_support( 'responsive-embeds' );
That’s it! Was this helpful?
More posts from themightymo.com
A while back, I started using WPMUDEV’s Defender Pro plugin for security on all my WordPress sites. I made a decision this week to switch to WordFence. The conversation was forced on me, because I had a site using Defender Pro that was hacked. I do not blame Defender Pro for the hack, however, this…
use a plugin to do a bunch of optimizations on this site, but for some reason, the preloading of fonts is broken. So I rolled my own font preloading function and placed it in my functional plugin (You could also put it in functions.php). Here’s the code.
Beaver Builder doesn’t give you an interface to change the background color of the sticky menu after scrolling. Here’s a simple bit of CSS that can help.