• I’m trying to add post metadata on a Custom Post Type, but didn’t display on the Control Panel of my Custom Post Type. I’m using this frontend code with html form.

    $title = $_POST['titulo'];
    $content = $_POST['contenido'];
    $post_type = 'sgpa_proyecto';
    $curso = $_POST['proyecto_curso'];
    
    $new_post = array(
    'post_title' => $title,
    'post_content' => $content,
    'post_status'   => 'publish',
    'post_type'     => $post_type
    );
    
    $post_id = wp_insert_post($new_post);							add_post_meta($post_id, 'proy-curso', 'ELO-230',true);

    Please Help!

    https://wordpress.org/plugins/types/

The topic ‘Problem Using add_post_meta()’ is closed to new replies.