Though it is considered an aging bit of code by some designers and developers, not to mention the issues Search Engine Optimization folks have with it, the IFRAME still gets a lot of mileage from various users and resources. By default, the WordPress editor strips out the IFRAME and related tags. This can be a huge frustration and confusion for users that aren’t aware of this as they wonder where their code went.
Like most such practices, this precaution by the developers of the WordPress code has valid reasons, but if you absolutely need IFRAME functionality, it is just a few lines of code away.
The brute force approach would be to disable the IFRAME stripping in the core WordPress files, but we generally recommend against this because you can unintentionally damage the backbone of your site and because it will probab
ly be overwritten or conflict with future WordPress core updates.
Instead, you can add iFRAME support in your current theme’s functions.php file. This way it will persist during WordPress upgrades and you can migrate and replicate it if you use the theme elsewhere. The functions.php file can be found in the root directory of your current theme folder (/wp-content/themes/YOUR_THEME_NAME/).
Simply add the following code at the end of your functions.php (but before the closing PHP tag). Be sure not to add any line-breaks after the closing PHP tag as this can cause problems in some environments.
Need help implementing this plugin in your WordPress site? Contact us for our professional services. We can also provide support & expertise in convenient “blocks” to suit your short and long term needs.
I'm the front-man of It's WordPress. I come from a diverse array of backgrounds, enjoying the opportunity to expand my knowledge base and skill set by re-inventing myself. I enjoy environments that focus on emerging information, technology and concepts. I put on the technical hat in my early 20s and never really looked back. I'm love technology and the internet, as well as the outdoors and avidly hike, kayak and camp every chance I get.
We can take you from concept, through design, development and deployment in one seamless process. Whether you choose a self-managed web site or need a continuing support relationship; we've got you covered.