By default wordpress does not allow you to add iframe code into the blog post due to security reasons but if you need to add it, you can do it in following two ways:
1. Add the following code to the functions.php file
function add_iframe($initArray) {
$initArray['extended_valid_elements'] = “iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]“;
return $initArray;
}
add_filter(‘tiny_mce_before_init’, ‘add_iframe’);
$initArray['extended_valid_elements'] = “iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]“;
return $initArray;
}
add_filter(‘tiny_mce_before_init’, ‘add_iframe’);
2. you can install Iframe plugin and then to embed the iframe into post, you just need use shortcode as follows:
[iframe width="640" height="480" src="http://example.com/video/3261363"]
click here to download Iframe plugin
