How to embed iframe code in wordpress
I encountered this problem when I wanted to embed Google Presentation in WordPress post. So as usual, in writing post screen, I switch to ‘HTML’ mode, paste the code and go back to ‘Visual’ mode. Surprisingly nothing showed up, so I switched back to ‘HTML’ mode, and found out that the embedded code is no longer there. Tried couple of times but with no luck.
I headed to WordPress forum, and moments later found what the problem is. This is a known issue in WordPress 2.5 and above. Whenever ‘iframe‘ code is copied to the post on the ‘html’ mode and when you switch back to ‘Visual’ mode, the code will be gone. The milestone for this bug to get fixed is on 2.9.
The workaround is, once you had put the code there, don’t move back to ‘Visual’ mode. Directly save or publish the post, and the embedded code is viewable. So whenever you want to use ‘iframe’ code in your post, make sure you have finished writing your post, and embedding this code should be the last step before you publish the post.
Alternatively, you can also stay in HTML code whenever you edit the post. Enjoy the slide!
yes.. i do looking for this for so long.. with iframe.. makes my job easier to embed any html coding in my wp post..
Superb…, finally I found this solution, simple and smart. Thanks for the tips guys. Have a nice day and Happy New Year 2009
Happy new year buddy!!
Thanks, I did this once, got it to appear. But was struggling with the float parameter being in the wrong place. Didn’t realize what I had done and then went back to visual and lost the code.
Worked just like you said first time back. Many thanks and gratitude.
I found another way: Build a separate template (php) file for that page, and then put the iframe code there. I built several pages that way for the new http://www.tngop.org, which is an all-WordPress site.
My problem now is, I embedded our Twitter page on one of those pages using an iframe and it briefly appears and then disappears. It only happens with the Twitter page, although I used iframe code and separate php templates to build more than half a dozen pages.
@Bill, thanks. I’ve been using that on this post. I’ll update this steps. thanks for the tip again
Its always the most obvious, simple solution… thanks!
this is awesome. the html worked just as I had hoped.
fyi:I am using a fresh installation of wordpress 2.7.1
Automatic Blog’s WordPress plugin will help you put an end to boring blog postings once and for all.
It’s true! The program works effortlessly by pulling FULL articles from ArticlesBase article directory to your WordPress blog.
Automatic Blog gets fresh new articles each and every day and posts automatically to your blog.
All external links inside these articles have a “nofollow” attribute and target=”_blank” (open links in a new browser window).
You should know, there’s no need to worry about copyrights laws.
Automatic Blog plugin grabs the article with the author resource box, in a format that conforms with the ArticlesBase TOS (Terms of Service).
How do i resize post width to fit the iframed page?
Hi!
I did an wordpress plugin named Insere Iframe that let you insert an iframe in your posts.
You can find it at http://www.idealmind.com.br/wordpress/insereiframe-a-simple-wordpress-plugin-to-insert-iframe-in-posts/
@IdealMind – will look at it
I came on it myself and did what you wrote here, but even if you save the post and publish it, for some reason iframe code gets lost.
The root of this is the editor wordpress use, it does not allow iframe code. You need to add iframe to the editor code, but once you update the editor the change is lost.
you can add code, a short code, that will help
or you use a plug in or as a last resort wait till wp 2.9 comes around.
I opt for the plugin first, later I might add a shortcode if that is better or as last option, remove the editor in post creation.
2.91 is now there but the problem is the same as before!
How do I embed this with embed iframe? It seems that brackets in link does not make it work, thanks.
http://www.guiamonterrey.com/gm50/AGNOMBRE_view.php?FilterField1=2&FilterOperator=&FilterValue1=AGAU&categ=AGAU
without the parameters in brackets it works
brackets got removed after FilterField{1} and FilterValue{1}
This bug is still not resolved with 3.0.1 and it is driving me crazy!!
My post iframes and embeds (of Google maps) disappear when someone accidentally edits the post in Visual mode