Support » Plugin: Toolset Types - Custom Post Types, Custom Fields and Taxonomies » Setting Types checkboxes using add_post_meta

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sorry, the code is wrong, here it is :

    $urgence = serialize($_POST['urgence']);
    $fiche = array(
    'post_title' => $_POST['nom'],
    'post_content' => "",
    'post_type' => 'fiche-animal',
    'post_status' => 'draft'
    );
    $id_post = wp_insert_post($fiche);
    add_post_meta( $id_post, 'wpcf-urgence', $urgence );

    Has nobody any idea on how to make it work ? :/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Setting Types checkboxes using add_post_meta’ is closed to new replies.