• Hello forums

    I have an issue with the wp_insert_post() function. I added 2 additional columns in the wp_post table via phpmyadmin namely videoFile and videoThumb. But when I tried to enter some data into it the wp_insert_function doesn’t enter it. Is the function only applicable to default wordpress wp_post columns?

    ` if(isset($_POST[‘submit’])){

    $my_post = array();
    $my_post[‘post_title’] = $_POST[‘title’];
    $my_post[‘post_content’] = $_POST[‘content’];
    $my_post[‘post_status’] = ‘publish’;
    $my_post[‘post_author’] = 1;
    $my_post[‘post_category’] = array(4);
    $my_post[‘videoFile’] = $_POST[‘flv’];
    $my_post[‘videoThumb’] = $_POST[‘thumb’];

    wp_insert_post($my_post);
    $id = wp_insert_post($my_post);
    echo $id;

    }`

    thanks I’m kinda stuck

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘wp_insert_post doesn’t insert data for added columns’ is closed to new replies.