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>
<pubDate>Mon, 09 Feb 2015 18:55:25 +0000</pubDate>
<guid isPermaLink="false">http://BLMoneyMasters.com/?page_id=6</guid>
<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>
<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>
**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.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.