admin管理员组

文章数量:1415460

This is a WordPress core question and only a CSS question as a byproduct.

I am designing a theme using bootstrap. Everything looks exactly as I want it to with one exception - links embedded from my test blog.

According to bootstrap, there are utility classes for ensuring responsive iframes. However, this is markup from deep within the depths of WordPress and the block system.

It comes from the_content(); like this:

<p><iframe ...></iframe></p>

The result looking like this - notice how the oembed has overflowed the right-hand side:

Is there a way to class those p tags (and only those p tags as embed-responsive embed-responsive-16by9 or similar or is there some other way to make the errant iframe get back inside where it belongs?

For example, is there something I can hook to alter the output of the_content() and specifically investigate which type of block each one is?

本文标签: theme developmentHow do I keep my iframes responsive and scaled to fit their container