i’m having a problem with wordpress and iFrame.
I’m trying to frame an application and the height isn’t working. I change the height yet it stays the same height and I cannot figure it out. I’ve tried numerous plugins, but will not help either.
The width works fine, but the heigh is just staying small, you have to scroll which bothers me and potential clients as well.
It worked on my old wordpress theme, but now i’m using a new one called Mana.
Sadly, I don’t have enough reputation points to post a picture to show you. I cannot fix this for the life of me. Its with any application really. Videos work fine though. I’ve been trying to solve this for weeks. I’ve had no luck with anything, any help will be appreciated. The iFrame code is below as well. Also, the width works fine, its just the height. I’m pretty sure its the theme, but theres really no support for it so this is my last resort.
<iframe src="http://www.example.com/application" height="2000" width="750" frameborder="0"></iframe>
You can try this, as shown below. I am using an
!important
onheight
.WordPress enforces a minimum and maximum height protection on iframe tags in the
wp-includes/js/wp-embed.js
file. The minimum and maximum height specified are respectively200px
and1000px
.A modification to the iframe CSS or height property will not affect the height as it will be overwritten automatically.
This is enforced in the following code snippet (wp-includes/js/wp-embed.js) :
I wrote an article including the JavaScript solution to bypass wordpress iframe height limit
https://medium.com/@wlarch/overwrite-and-bypass-wordpress-iframe-height-dimension-limit-using-javascript-9d5035c89e37
What happens if you do like this?