iframe video code not imported into Multisite

I installed 4.1 onto a clean EC2 instance, created a new DB, only post Hello World
Then converted that instance to Multisite subdomain
I created a new site and all is well
Export from blmoneymasters.com using WP Export
Import into money.artilent.com
This was a test so the import is merely 7 pages, 7 videos, 1 post (Sample), no images
The import dropped all iframe code in the pages
See the page here blmoneymasters.com/video-lesson-one
See the resulting imported page here money.artilent.net/video-lesson-one
Code was exported, I see it in the XML (file is 20K so I could not attach it for completeness)

**here is a snippet of this page in the XML file**
<title>Lesson One: Stock Pick</title>
<link>http://BLMoneyMasters.com/video-lesson-one/</link>
<pubDate>Mon, 09 Feb 2015 18:55:25 +0000</pubDate>
<dc:creator><![CDATA[jporper]]></dc:creator>
<guid isPermaLink="false">http://BLMoneyMasters.com/?page_id=6</guid>
<description></description>
<content:encoded><![CDATA[<iframe class="wistia_embed" src="//fast.wistia.net/embed/iframe/wrovqw43yp" name="wistia_embed" width="800" height="450" frameborder="0" scrolling="no" allowfullscreen="allowfullscreen"></iframe><script src="//fast.wistia.net/assets/external/E-v1.js" async=""></script>

Watch your email for the next video in the FREE investor education series. On February 13, you'll receive an email with the link to the next video. The subject line will be "Are You a Winning Stock Picker? (4:06 Video)." You may even want to make a note on your calendar or a sticky note and check all your email folders that day.]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>6</wp:post_id>
<wp:post_date>2015-02-09 18:55:25</wp:post_date>
<wp:post_date_gmt>2015-02-09 18:55:25</wp:post_date_gmt>
<wp:comment_status>closed</wp:comment_status>
<wp:ping_status>closed</wp:ping_status>
<wp:post_name>video-lesson-one</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>page</wp:post_type>
**end of snippet**

The other 5 sites planned for this multisite instance have 4000-5000 posts each and probably 2,000 of the posts have the same iframe links as this one with the pages.

How do I get around this or what didn't I configure.
Thank you

  • Ash

    Hello @joe romello

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    Wordpress doesn't allow you to programmatically insert iframes into posts.

    Please try the following code:

    remove_filter('content_save_pre', 'wp_filter_post_kses');
    remove_filter('excerpt_save_pre', 'wp_filter_post_kses');
    remove_filter('content_filtered_save_pre', 'wp_filter_post_kses');

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Then import again, check if iframe code works now. If it still doesn't work, then go to /wp-includes/kese.php line no 1404, 1405 and 1406 and comment out these three lines:

    //add_filter('content_save_pre', 'wp_filter_post_kses');
    //add_filter('excerpt_save_pre', 'wp_filter_post_kses');
    //add_filter('content_filtered_save_pre', 'wp_filter_post_kses');

    Save and run the import again.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.