Embedding an iframe in Wordpress does not work
15,709
Solution 1
probably one of these things:
- if your website httpS then its blocked because your iframe is http.
- make sure that you in text ( not visual ) editing mode on post editing screen
- WP caching ?
Solution 2
The Wordpress editor blocks/removes iframes. Try using some of the plugins out there that supports iframes, og make an Shortcode to make iframes.
Author by
Admin
Updated on July 26, 2022Comments
-
Admin almost 2 years
I need to embed the following code on a self hosted Wordpress installation -
<iframe id="slydy" style = "border: none; max-width: 100%; min-width: 100px;" src = "http://slydy.co/users/TCC/01" width = "648" height = "435" frameborder = "0" marginwidth = "0" marginheight = "0" scrolling = "no" allowfullscreen = "allowfullscreen"> </iframe>
but it just doesn't show up. I've installed the same on at least two other Wordpress blogs and it worked just fine.
What setting do i need to tweak?
-
Lee Taylor almost 9 yearsOr, Same Origin Policy - developer.mozilla.org/en-US/docs/Web/Security/…
-
Lee Taylor almost 9 yearsOK, It's not Same Origin Policy in this case as I've just tried it and it works.
-
MarsAndBack over 5 yearsThis may no longer be correct, and/or depends on where in WordPress you're putting your iFrame code. For example, in WordPress 5's Editor/Custom HTML block, an iframe renders just fine.