Shantanu Kumar
Shantanu Kumar

Reputation: 61

Embedding an iframe in Wordpress does not work

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?

Upvotes: 6

Views: 27204

Answers (3)

Hussain Abdullah
Hussain Abdullah

Reputation: 27

I don't know why, but embeds were working fine on my website. Suddenly, I noticed that the embeds only show in the WordPress customization mode (on the visual part). When I save the changes and close the customizer, the iframe embeds don't show up. After searching on Google, I found a solution. The solution is the Iframe Plugin, which can be found here: https://wordpress.org/plugins/iframe/

After enabling this plugin on your website, you just need to change the codes like this:

For example, if your iframe code is <iframe ...........................> '</iframe ' >', you have to change it to [iframe ...........................].

So what you are doing here is changing < with [ and removing the '</iframe'>'.

Hope this helps someone.

Upvotes: 0

Mauran Muthiah
Mauran Muthiah

Reputation: 1229

The Wordpress editor blocks/removes iframes. Try using some of the plugins out there that supports iframes, og make an Shortcode to make iframes.

Upvotes: 2

Robert Isaev
Robert Isaev

Reputation: 121

probably one of these things:

  1. if your website httpS then its blocked because your iframe is http.
  2. make sure that you in text ( not visual ) editing mode on post editing screen
  3. WP caching ?

Upvotes: 7

Related Questions