In my install, I use one custom page. Here I put one text field and the fck editor. This is for the title and the content. I need to insert this into a page.

I use the following code

$my_post = array(
    'post_title'    => $_POST['title'],
    'post_content'  => $_POST['content'],
    'post_type'       => 'page',
    'post_status'   => 'publish',
    'post_author'   => 1,
    'menu_order'    => 10,

// Insert the post into the database
$post_ID = wp_insert_post( $my_post );  

In the content field, I insert the content with some iframe videos. The page inserted successfully, but the iframe tags are not updated. They are deleted while update or insert the content.

  • Please care about your English and the format of your questions (and its code). Also: Take a look at oembed and how to insert 3rd party provider videos properly in WordPress. – kaiser May 9 '14 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.